ApiProxyHandler implements DispatcherHandler<EndpointsContext> { @Override public void handle(EndpointsContext context) throws IOException { if (cachedProxyHtml == null) { cachedProxyHtml = IoUtil.readResourceFile(ApiProxyHandler.class, "proxy.html"); } context.getResponse().setContentType("text/html"); context.getResponse().addHeader("X-Frame-Options", "ALLOWALL"); context.getResponse().getWriter().write(cachedProxyHtml); }  @Override void handle(EndpointsContext context);  }
@Test public void handle() throws Exception { testWithServletPath("/_ah/api"); }