### Question:
App implements RequestHandler<Object, Object> { public Object handleRequest(final Object input, final Context context) { Map<String, String> headers = new HashMap<>(); headers.put("Content-Type", "application/json"); headers.put("X-Custom-Header", "application/json"); try { final String pageContents = this.getPageContents("https: String output = String.format("{ \"message\": \"hello world\", \"location\": \"%s\" }", pageContents); return new GatewayResponse(output, headers, 200); } catch (IOException e) { return new GatewayResponse("{}", headers, 500); } }  Object handleRequest(final Object input, final Context context);  }### Answer:
@Test public void successfulResponse() { App app = new App(); GatewayResponse result = (GatewayResponse) app.handleRequest(null, null); assertEquals(result.getStatusCode(), 200); assertEquals(result.getHeaders().get("Content-Type"), "application/json"); String content = result.getBody(); assertNotNull(content); assertTrue(content.contains("\"message\"")); assertTrue(content.contains("\"hello world\"")); assertTrue(content.contains("\"location\"")); }