OperationModeStatusServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  OperationModeStatusServlet(ProxyModeToggle proxyModeToggle, RoutingService routingService);   }
@Test public void testDoPostShouldWriteStatusToResponse() throws ServletException, IOException { given(proxyModeToggle.isProxyModeOn()).willReturn(true); given(routingService.isStubModeOn()).willReturn(false); underTest.doPost(request, response); verify(printWriter).write("{\"proxyMode\":true,\"stubMode\":false,\"wilmaMode\":false}"); }