ResponseMessageVolatilityOnServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { logger.info(urlAccessLogMessageAssembler.assembleMessage(req, "Response Message Volatility: ON")); ProxyServer.setResponseVolatile(true); } @Autowired  ResponseMessageVolatilityOnServlet(UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);   }
@Test public final void testDoGetShouldAssembleMessage() throws ServletException, IOException { underTest.doGet(request, response); verify(urlAccessLogMessageAssembler).assembleMessage(Mockito.any(HttpServletRequest.class), Mockito.anyString()); }
@Test public final void testDoGetShouldTurnResponseVolatilityOn() throws ServletException, IOException { ProxyServer.setResponseVolatile(false); underTest.doGet(request, response); Assert.assertTrue(ProxyServer.getResponseVolatile()); }