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