@Test public void testDoGetShouldWriteResponse() throws ServletException, IOException { underTest.doGet(req, resp); verify(printWriter).write(SHUTDOWN_MESSAGE); verify(printWriter).flush(); verify(printWriter).close(); }
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(SHUTDOWN_MESSAGE); writeResponse(resp); webAppStopper.stopAsync(); }
ShutdownServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(SHUTDOWN_MESSAGE); writeResponse(resp); webAppStopper.stopAsync(); } }
ShutdownServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(SHUTDOWN_MESSAGE); writeResponse(resp); webAppStopper.stopAsync(); } ShutdownServlet(final WebAppStopper webAppStopper); }
ShutdownServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(SHUTDOWN_MESSAGE); writeResponse(resp); webAppStopper.stopAsync(); } ShutdownServlet(final WebAppStopper webAppStopper);  }
ShutdownServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(SHUTDOWN_MESSAGE); writeResponse(resp); webAppStopper.stopAsync(); } ShutdownServlet(final WebAppStopper webAppStopper);   }