@Test
public void builderThrowsIfMaxBatchesInFlightEqualsZero() {

    // given
    Log4j2BatchLimitBackoffPolicy.Builder builder = Log4j2BatchLimitBackoffPolicy.newBuilder()
            .withMaxBatchesInFlight(0);
    expectedException.expect(ConfigurationException.class);
    expectedException.expectMessage("maxBatchesInFlight must be higher than 0 for " +
            BatchLimitBackoffPolicy.class.getSimpleName());
    // when
    builder.build();
}