assertThat(events.size(), equalTo(5));
LoggingEvent event = events.get(0);
assertThat(event, notNullValue());
assertThat(event.getLevel(), equalTo(Level.ERROR));
assertThat(event.getRenderedMessage(), equalTo("This is an error"));
LocationInfo locationInfo = event.getLocationInformation();
assertThat(locationInfo, notNullValue());
assertThat(locationInfo.getClassName(), equalTo(Log4jESLoggerTests.class.getCanonicalName()));
assertThat(locationInfo.getMethodName(), equalTo("locationInfoTest"));
event = events.get(1);
assertThat(event, notNullValue());
assertThat(event.getLevel(), equalTo(Level.WARN));
assertThat(event.getRenderedMessage(), equalTo("This is a warning"));
locationInfo = event.getLocationInformation();
assertThat(locationInfo, notNullValue());
assertThat(locationInfo.getClassName(), equalTo(Log4jESLoggerTests.class.getCanonicalName()));
assertThat(locationInfo.getMethodName(), equalTo("locationInfoTest"));
event = events.get(2);
assertThat(event, notNullValue());
assertThat(event.getLevel(), equalTo(Level.INFO));
assertThat(event.getRenderedMessage(), equalTo("This is an info"));
locationInfo = event.getLocationInformation();
assertThat(locationInfo, notNullValue());
assertThat(locationInfo.getClassName(), equalTo(Log4jESLoggerTests.class.getCanonicalName()));
assertThat(locationInfo.getMethodName(), equalTo("locationInfoTest"));
event = events.get(3);
assertThat(event, notNullValue());
assertThat(event.getLevel(), equalTo(Level.DEBUG));
assertThat(event.getRenderedMessage(), equalTo("This is a debug"));
locationInfo = event.getLocationInformation();
assertThat(locationInfo, notNullValue());
assertThat(locationInfo.getClassName(), equalTo(Log4jESLoggerTests.class.getCanonicalName()));
assertThat(locationInfo.getMethodName(), equalTo("locationInfoTest"));
event = events.get(4);
assertThat(event, notNullValue());
assertThat(event.getLevel(), equalTo(Level.TRACE));
assertThat(event.getRenderedMessage(), equalTo("This is a trace"));
locationInfo = event.getLocationInformation();
assertThat(locationInfo, notNullValue());
assertThat(locationInfo.getClassName(), equalTo(Log4jESLoggerTests.class.getCanonicalName()));
assertThat(locationInfo.getMethodName(), equalTo("locationInfoTest"));
}