LoggingBulkProcessorListener implements BulkProcessor.Listener { @Override public void afterBulk(long executionId, BulkRequest request, BulkResponse response) { if(log.isDebugEnabled()) { log.debug("ExecutionId = {}, Actions = {}, Estimated Size = {}", executionId, request.numberOfActions(), request.estimatedSizeInBytes()); } } LoggingBulkProcessorListener(); @Override void beforeBulk(long executionId, BulkRequest request); @Override void afterBulk(long executionId, BulkRequest request, BulkResponse response); @Override void afterBulk(long executionId, BulkRequest request, Throwable failure);  }
@Test public void testAfterBulk() throws Exception { TestUtils.assertDoesNotThrow(() -> listener.afterBulk(1, new BulkRequest(), new BulkResponse(new BulkItemResponse[]{}, 1000))); }
@Test public void testAfterBulk1() throws Exception { TestUtils.assertDoesNotThrow(() -> listener.afterBulk(1, new BulkRequest(), new BulkResponse(new BulkItemResponse[]{}, 1000))); }