MessageLoggingOnServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  MessageLoggingOnServlet(UrlAccessLogMessageAssembler urlAccessLogMessageAssembler, MessageLoggingToggle messageLoggingToggle);   }
@Test public final void testDoPostAddsBothProcessors() throws ServletException, IOException { underTest.doPost(request, response); verify(messageLoggingToggle).switchOnMessageLogging(); }