@Test void shouldNotLogResponseBody_whenBodyIsTooLarge() throws IOException { SimpleLogger simpleLogger = SimpleLogger.builder() .setEnabled(true) .setResponseEnabled(true) .build(); Response response = mock(Response.class); when(response.contentLength()).thenReturn(1024); simpleLogger.logResponse("test", response); verify(response, times(0)).toByteArray(); verify(response, times(0)).headers(); }
public static Builder builder() { return new Builder(); }
SimpleLogger extends AbstractLogger { public static Builder builder() { return new Builder(); } }
SimpleLogger extends AbstractLogger { public static Builder builder() { return new Builder(); } private  SimpleLogger(boolean enabled, boolean requestEnabled, boolean responseEnabled,
      boolean headersEnabled); }
SimpleLogger extends AbstractLogger { public static Builder builder() { return new Builder(); } private  SimpleLogger(boolean enabled, boolean requestEnabled, boolean responseEnabled,
      boolean headersEnabled); static Builder builder(); }
SimpleLogger extends AbstractLogger { public static Builder builder() { return new Builder(); } private  SimpleLogger(boolean enabled, boolean requestEnabled, boolean responseEnabled,
      boolean headersEnabled); static Builder builder();  }