use of org.apache.druid.server.emitter.ComposingEmitterConfig in project druid by druid-io.
the class ComposingEmitterModuleTest method testGetEmitter.
@Test
public void testGetEmitter() {
ComposingEmitterConfig config = EasyMock.createMock(ComposingEmitterConfig.class);
EasyMock.expect(config.getEmitters()).andReturn(Collections.singletonList(testEmitterType)).anyTimes();
Injector injector = EasyMock.createMock(Injector.class);
EasyMock.expect(injector.getInstance(Key.get(Emitter.class, Names.named(testEmitterType)))).andReturn(emitter);
EasyMock.replay(config, injector);
Emitter composingEmitter = new ComposingEmitterModule().getEmitter(config, injector);
composingEmitter.start();
EasyMock.verify(config, emitter, injector);
}
Aggregations