@Test public void doGetWritesResponse() throws Exception { servletUnderTest.doGet(mockRequest, mockResponse); assertThat(responseWriter.toString()) .named("HelloAppEngine response") .contains("Hello App Engine - Standard "); }
@Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { Properties properties = System.getProperties(); response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Standard using " + SystemProperty.version.get() + " Java " + properties.get("java.specification.version")); }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { Properties properties = System.getProperties(); response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Standard using " + SystemProperty.version.get() + " Java " + properties.get("java.specification.version")); } }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { Properties properties = System.getProperties(); response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Standard using " + SystemProperty.version.get() + " Java " + properties.get("java.specification.version")); }  }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { Properties properties = System.getProperties(); response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Standard using " + SystemProperty.version.get() + " Java " + properties.get("java.specification.version")); }  @Override void doGet(HttpServletRequest request, HttpServletResponse response); static String getInfo(); }
HelloAppEngine extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { Properties properties = System.getProperties(); response.setContentType("text/plain"); response.getWriter().println("Hello App Engine - Standard using " + SystemProperty.version.get() + " Java " + properties.get("java.specification.version")); }  @Override void doGet(HttpServletRequest request, HttpServletResponse response); static String getInfo();  }