### Question:
BulkProcessorObjectFactory implements ClientObjectFactory<TransportClient, BulkRequest> { @Override public Function<BulkRequest, Boolean> createBatchListener(FailoverPolicy failoverPolicy) { return noop -> true; } protected  BulkProcessorObjectFactory(Collection<String> serverUris, Auth auth); protected  BulkProcessorObjectFactory(Collection<String> serverUris, Auth auth, ClientSettings clientSettings); @Override Collection<String> getServerList(); @Override TransportClient createClient(); @Override Function<BulkRequest, Boolean> createBatchListener(FailoverPolicy failoverPolicy); @Override Function<BulkRequest, Boolean> createFailureHandler(FailoverPolicy failover); @Override BatchOperations<BulkRequest> createBatchOperations(); @Override void execute(IndexTemplate indexTemplate); @Override void addOperation(Operation operation); @PluginBuilderFactory static Builder newBuilder();  }### Answer:
@Test public void defaultBatchListenerDoesntThrow() { BulkProcessorObjectFactory factory = createTestObjectFactoryBuilder().build(); Function<BulkRequest, Boolean> batchListener = factory.createBatchListener(failedPayload -> { throw new ConfigurationException("test exception"); }); batchListener.apply(null); }