### Question:
WelcomeHandler extends GenericHeapObject implements Handler { @Override public Promise<Response, NeverThrowsException> handle(final Context context, final Request request) { Response response = new Response(); response.setStatus(Status.OK); response.getHeaders().add("Content-Type", "text/html"); response.setEntity(IO.newBranchingInputStream(getClass().getResourceAsStream( "welcome.html"), getStorage())); return Promises.newResultPromise(response); } WelcomeHandler(); @Override Promise<Response, NeverThrowsException> handle(final Context context, final Request request);  }### Answer:
@Test public void getWelcomePage() throws Exception { final WelcomeHandler handler = new WelcomeHandler(); Request request = new Request(); request.setMethod("GET"); request.setUri("http: Response response = handler.handle(null, request).get(); assertThat(response.getStatus()).isEqualTo(Status.OK); assertThat(response.getHeaders().getFirst("Content-Type")).isEqualTo("text/html"); assertThat(response.getEntity().getRawContentInputStream().available()).isGreaterThan(0); response.close(); }