try {
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
assertEquals("Hello World", reader.readLine());
} finally {
connection.disconnect();
}
container.removeWebService(contextPath);
connection = (HttpURLConnection) new URL(connector.getConnectUrl() + contextPath).openConnection();
try {
connection.getInputStream();