### Question:
SequenceHandlingOffServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { sequenceHandlingToggle.switchOff(); logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Sequence handling: OFF")); } @Autowired  SequenceHandlingOffServlet(SequenceHandlingToggle sequenceHandlingToggle, UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);   }### Answer:
@Test public void testDoGetShouldSwitchSequenceHandlingOff() throws ServletException, IOException { underTest.doGet(req, resp); verify(sequenceHandlingToggle).switchOff(); }
@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"); }