@Test
public final void testDoGetSetsResponseTypeAndWritesResponse() throws ServletException, IOException {

    // GIVEN
    given(response.getWriter()).willReturn(printWriter);
    given(messageLoggingToggle.isRequestLoggingOn()).willReturn(true);
    given(messageLoggingToggle.isResponseLoggingOn()).willReturn(true);
    // WHEN
    underTest.doGet(request, response);
    // THEN
    verify(response).setContentType("application/json");
    verify(messageLoggingToggle).isRequestLoggingOn();
    verify(messageLoggingToggle).isResponseLoggingOn();
    verify(printWriter).write("{\"requestLogging\":true,\"responseLogging\":true}");
}