// public void testMbwWithUmlaut() throws IOException {
// testMbw("foob\u00E4r"); // foobär
// }
private void testMbw(String param) throws IOException {
final TestWebServer testWebServer = createTestWebServer(new MyResource());
int port = testWebServer.getPort();
URL serverURL = new URL("http://localhost:" + port + "/foo/bar?name=" + param);
HttpURLConnection connection = (HttpURLConnection) serverURL.openConnection();
connection.setRequestMethod("GET");
connection.addRequestProperty("Accept", "application/json, */*; q=.2");
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
String line = br.readLine();
// System.out.println(line);
Assert.assertEquals("{\"name\":\""+param+"\"}", line);
testWebServer.stop();
}