@Test public void doGetShouldLogMessageAtInfoLevel() throws ServletException, IOException { Whitebox.setInternalState(underTest, "logger", logger); underTest.doGet(req, resp); verify(logger).info(Mockito.anyString()); }
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Set Localhost Mode: ON")); localhostRequestProcessorToggle.switchOn(); }
BlockLocalhostUsageOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Set Localhost Mode: ON")); localhostRequestProcessorToggle.switchOn(); } }
BlockLocalhostUsageOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Set Localhost Mode: ON")); localhostRequestProcessorToggle.switchOn(); } @Autowired  BlockLocalhostUsageOnServlet(LocalhostRequestProcessorToggle localhostRequestProcessorToggle,
            UrlAccessLogMessageAssembler urlAccessLogMessageAssembler); }
BlockLocalhostUsageOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Set Localhost Mode: ON")); localhostRequestProcessorToggle.switchOn(); } @Autowired  BlockLocalhostUsageOnServlet(LocalhostRequestProcessorToggle localhostRequestProcessorToggle,
            UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);  }
BlockLocalhostUsageOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Set Localhost Mode: ON")); localhostRequestProcessorToggle.switchOn(); } @Autowired  BlockLocalhostUsageOnServlet(LocalhostRequestProcessorToggle localhostRequestProcessorToggle,
            UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);   }