LazyFields implements HttpFunction { @Override public void service(HttpRequest request, HttpResponse response) throws IOException { Integer lazyGlobal = LazyGlobalHolder.getInstance(); var writer = new PrintWriter(response.getWriter()); writer.printf("Lazy global: %s; non-lazy global: %s%n", lazyGlobal, NON_LAZY_GLOBAL); }  @Override void service(HttpRequest request, HttpResponse response);  }
@Test public void lazyTest() throws IOException { new LazyFields().service(request, response); writerOut.flush(); assertThat(responseOut.toString()).contains("Lazy global:"); }