@Test public void testDoPostShouldDoTheSameAsDoGet() throws ServletException, IOException { given(urlAccessLogMessageAssembler.assembleMessage(req, SHUTDOWN_MESSAGE)).willReturn("logmessage"); underTest.doPost(req, resp); verify(wilmaService).stop(); verify(logger).info("logmessage"); verify(printWriter).write(SHUTDOWN_MESSAGE); }
@Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); }
ShutdownServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } }
ShutdownServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  ShutdownServlet(WilmaService wilmaService, UrlAccessLogMessageAssembler urlAccessLogMessageAssembler); }
ShutdownServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  ShutdownServlet(WilmaService wilmaService, UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);  }
ShutdownServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  ShutdownServlet(WilmaService wilmaService, UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);   }