@Test public void testResponseWriterFiltersInternalBinaryHeader() throws IOException { Map<String, List<String>> headers = new HashMap<>(); headers.put("a_k", Collections.singletonList("a_v")); headers.put(GatewayBinaryResponseFilter.HEADER_BINARY_RESPONSE, Collections.singletonList("true")); headers.put("b_k", Collections.singletonList("b_v")); SimpleResponseWriter<GatewayResponse> responseWriter = gatewayHandler.createResponseWriter(null); responseWriter.writeResponse(Status.OK, headers, new ByteArrayOutputStream()); assertEquals(ImmutableMap.of("a_k", "a_v", "b_k", "b_v"), responseWriter.getResponse().getHeaders()); }
@Override protected SimpleResponseWriter<GatewayResponse> createResponseWriter( GatewayRequestAndLambdaContext requestAndContext) { return new ResponseWriter(); }
GatewayRequestHandler extends SimpleRequestHandler<GatewayRequestAndLambdaContext, GatewayResponse> { @Override protected SimpleResponseWriter<GatewayResponse> createResponseWriter( GatewayRequestAndLambdaContext requestAndContext) { return new ResponseWriter(); } }
GatewayRequestHandler extends SimpleRequestHandler<GatewayRequestAndLambdaContext, GatewayResponse> { @Override protected SimpleResponseWriter<GatewayResponse> createResponseWriter( GatewayRequestAndLambdaContext requestAndContext) { return new ResponseWriter(); } protected  GatewayRequestHandler(); }
GatewayRequestHandler extends SimpleRequestHandler<GatewayRequestAndLambdaContext, GatewayResponse> { @Override protected SimpleResponseWriter<GatewayResponse> createResponseWriter( GatewayRequestAndLambdaContext requestAndContext) { return new ResponseWriter(); } protected  GatewayRequestHandler();  }
GatewayRequestHandler extends SimpleRequestHandler<GatewayRequestAndLambdaContext, GatewayResponse> { @Override protected SimpleResponseWriter<GatewayResponse> createResponseWriter( GatewayRequestAndLambdaContext requestAndContext) { return new ResponseWriter(); } protected  GatewayRequestHandler();   }