IndexingWriterConfiguration implements WriterConfiguration { @Override public int getBatchTimeout(String sensorName) { return config.orElse(new IndexingConfigurations()).getBatchTimeout(sensorName, writerName); } IndexingWriterConfiguration(String writerName, IndexingConfigurations config); @Override int getBatchSize(String sensorName); @Override int getBatchTimeout(String sensorName); @Override List<Integer> getAllConfiguredTimeouts(); @Override String getIndex(String sensorName); @Override boolean isEnabled(String sensorName); @Override Map<String, Object> getSensorConfig(String sensorName); @Override Map<String, Object> getGlobalConfig(); @Override boolean isDefault(String sensorName); @Override String getFieldNameConverter(String sensorName); @Override boolean isSetDocumentId(String sensorName);  }
@Test public void testDefaultBatchTimeout() { IndexingWriterConfiguration config = new IndexingWriterConfiguration("hdfs", new IndexingConfigurations() ); assertEquals(0, config.getBatchTimeout("foo")); }