encoder.setImmediateFlush(false);
assertThat(encoder.isImmediateFlush(), is(false));
}
private IAccessEvent mockBasicILoggingEvent() {
IAccessEvent event = mock(IAccessEvent.class);
when(event.getContentLength()).thenReturn(123L);
when(event.getMethod()).thenReturn("GET");
when(event.getProtocol()).thenReturn("HTTPS");
when(event.getRemoteHost()).thenReturn("123.123.123.123");
when(event.getRemoteUser()).thenReturn("remote-user");
when(event.getRequestURI()).thenReturn("/my/uri");
when(event.getRequestURL()).thenReturn("https://123.123.123.123/my/uri");
when(event.getStatusCode()).thenReturn(200);
when(event.getTimeStamp()).thenReturn(System.currentTimeMillis());
when(event.getElapsedTime()).thenReturn(246L);
return event;
}