@Test public void testDoPostShouldWriteStatusToResponse() throws ServletException, IOException { // GIVEN given(proxyModeToggle.isProxyModeOn()).willReturn(true); given(routingService.isStubModeOn()).willReturn(false); // WHEN underTest.doPost(request, response); // THEN verify(printWriter).write("{\"proxyMode\":true,\"stubMode\":false,\"wilmaMode\":false}"); }