StubModeOnServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  StubModeOnServlet(UrlAccessLogMessageAssembler urlAccessLogMessageAssembler, ProxyModeToggle proxyModeToggle, RoutingService routingService);   }
@Test public void testDoPostShouldSwitchOffProxyMode() throws ServletException, IOException { underTest.doPost(request, response); verify(proxyModeToggle).switchProxyModeOff(); }