HttpServerInfo httpServerInfo = injector.getInstance(HttpServerInfo.class);
HttpServer server = injector.getInstance(HttpServer.class);
server.start();
try (HttpClient client = new JettyHttpClient()) {
// test servlet bound correctly
URI httpUri = httpServerInfo.getHttpUri();
StatusResponse response = client.execute(prepareGet().setUri(httpUri).build(), createStatusResponseHandler());
assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK);
// test filter bound correctly
response = client.execute(prepareGet().setUri(httpUri.resolve("/filter")).build(), createStatusResponseHandler());
assertEquals(response.getStatusCode(), HttpServletResponse.SC_PAYMENT_REQUIRED);
assertEquals(response.getStatusMessage(), "filtered");
// test http resources