BulkProcessingOptionsBuilder { public BulkProcessingOptions build() { return new BulkProcessingOptions(name, concurrentRequests, bulkActions, bulkSize, flushInterval, backoffPolicy); }  BulkProcessingOptionsBuilder setName(String name); BulkProcessingOptionsBuilder setConcurrentRequests(int concurrentRequests); BulkProcessingOptionsBuilder setBulkActions(int bulkActions); BulkProcessingOptionsBuilder setBulkSize(ByteSizeValue bulkSize); BulkProcessingOptionsBuilder setFlushInterval(TimeValue flushInterval); BulkProcessingOptionsBuilder setBackoffPolicy(BackoffPolicy backoffPolicy); BulkProcessingOptions build();  }
@Test public void default_values_set_when_initializing_builder() { BulkProcessingOptions options = new BulkProcessingOptionsBuilder().build(); Assert.assertEquals(null, options.getName()); Assert.assertEquals(1, options.getConcurrentRequests()); Assert.assertEquals(1000, options.getBulkActions()); Assert.assertEquals(new ByteSizeValue(5, ByteSizeUnit.MB).bytes(), options.getBulkSize().bytes()); Assert.assertEquals(null, options.getFlushInterval()); Assert.assertEquals(BackoffPolicy.exponentialBackoff().getClass(), options.getBackoffPolicy().getClass()); }