HelloWorld implements HttpFunction { @Override public void service(HttpRequest request, HttpResponse response) throws IOException { BufferedWriter writer = response.getWriter(); writer.write("Hello World!"); }  @Override void service(HttpRequest request, HttpResponse response);  }
@Test public void helloWorldTest() throws IOException { new HelloWorld().service(request, response); writerOut.flush(); assertThat(responseOut.toString()).contains("Hello World!"); }