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