@Test public void doGet_writesResponse() throws Exception { servletUnderTest.doGet(mockRequest, mockResponse); assertThat(responseWriter.toString()) .named("HelloAppEngine response") .contains("Hello App Engine - Flexible!"); }
@Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Flexible!"); }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Flexible!"); } }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Flexible!"); }  }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Flexible!"); }  @Override void doGet(HttpServletRequest request, HttpServletResponse response); static String getInfo(); }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Flexible!"); }  @Override void doGet(HttpServletRequest request, HttpServletResponse response); static String getInfo();  }