### Question:
Log4j2BatchLimitBackoffPolicy extends BatchLimitBackoffPolicy<BatchRequest> { @PluginBuilderFactory public static Log4j2BatchLimitBackoffPolicy.Builder newBuilder() { return new Log4j2BatchLimitBackoffPolicy.Builder(); } Log4j2BatchLimitBackoffPolicy(int maxBatchesInFlight); @PluginBuilderFactory static Log4j2BatchLimitBackoffPolicy.Builder newBuilder();  }### Answer:
@Test public void builderBuildsSuccessfully() { Log4j2BatchLimitBackoffPolicy.Builder builder = Log4j2BatchLimitBackoffPolicy.newBuilder(); BackoffPolicy policy = builder.build(); Assert.assertNotNull(policy); }
@Test public void builderThrowsIfMaxBatchesInFlightEqualsZero() { Log4j2BatchLimitBackoffPolicy.Builder builder = Log4j2BatchLimitBackoffPolicy.newBuilder() .withMaxBatchesInFlight(0); expectedException.expect(ConfigurationException.class); expectedException.expectMessage("maxBatchesInFlight must be higher than 0 for " + BatchLimitBackoffPolicy.class.getSimpleName()); builder.build(); }
@Test public void builderThrowsIfMaxBatchesInFlightLowerThanZero() { Log4j2BatchLimitBackoffPolicy.Builder builder = Log4j2BatchLimitBackoffPolicy.newBuilder() .withMaxBatchesInFlight(-1); expectedException.expect(ConfigurationException.class); expectedException.expectMessage("maxBatchesInFlight must be higher than 0 for " + BatchLimitBackoffPolicy.class.getSimpleName()); builder.build(); }