@Test public void testDoGetShouldLogMessage() throws ServletException, IOException { given(urlAccessLogMessageAssembler.assembleMessage(req, MESSAGE)).willReturn("something"); underTest.doGet(req, resp); verify(urlAccessLogMessageAssembler).assembleMessage(req, MESSAGE); verify(logger).info("something"); }
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { sequenceHandlingToggle.switchOn(); logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Sequence handling: ON")); }
SequenceHandlingOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { sequenceHandlingToggle.switchOn(); logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Sequence handling: ON")); } }
SequenceHandlingOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { sequenceHandlingToggle.switchOn(); logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Sequence handling: ON")); } @Autowired  SequenceHandlingOnServlet(SequenceHandlingToggle sequenceHandlingToggle, UrlAccessLogMessageAssembler urlAccessLogMessageAssembler); }
SequenceHandlingOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { sequenceHandlingToggle.switchOn(); logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Sequence handling: ON")); } @Autowired  SequenceHandlingOnServlet(SequenceHandlingToggle sequenceHandlingToggle, UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);  }
SequenceHandlingOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { sequenceHandlingToggle.switchOn(); logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Sequence handling: ON")); } @Autowired  SequenceHandlingOnServlet(SequenceHandlingToggle sequenceHandlingToggle, UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);   }