Skip to content

Commit 1b09221

Browse files
committed
Replicate issue #50
1 parent 51aeeb6 commit 1b09221

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/test/java/co/zeroae/gate/AppTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
import java.io.IOException;
2525
import java.io.StringReader;
2626
import java.io.UnsupportedEncodingException;
27-
import java.util.*;
27+
import java.util.Collections;
28+
import java.util.HashMap;
29+
import java.util.Random;
30+
import java.util.UUID;
2831

2932
import static com.github.stefanbirkner.systemlambda.SystemLambda.withEnvironmentVariable;
3033
import static org.junit.Assert.*;
@@ -38,7 +41,7 @@ public static void setUpClass() throws Exception {
3841
}
3942

4043
private static App app = null;
41-
private static TestContext context = new TestContext();
44+
private static final TestContext context = new TestContext();
4245

4346
@Before
4447
public void setUp() {
@@ -213,7 +216,10 @@ public void testInputTypes() throws GateException {
213216
"text/x-json-datasift",
214217
"text/x-json-twitter",
215218
};
216-
for (String type: types) assertNotNull(Utils.ensureValidRequestContentType(type));
219+
for (String type : types) assertNotNull(Utils.ensureValidRequestContentType(type));
220+
221+
// This replicates issue #50
222+
assertNotNull(Utils.ensureValidRequestContentType("text/plain; charset=UTF-8"));
217223
}
218224

219225
@Test

0 commit comments

Comments
 (0)