boolean[] doOutput = { false, true, true, true };
URL url = applicationURL();
for (int i = 0;i < methods.length;i++) {
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setDoOutput(doOutput[i]);
HttpMethod method = methods[i];
conn.setRequestMethod(method.name());
assertEquals(200, conn.getResponseCode());
String ret = Tools.read(conn.getInputStream());
assertTrue("Was expecting " + ret + " to container ok[" + method + "]", ret.contains("ok[" + method + "]"));
}
}