use of org.apache.druid.guice.ConfigModule in project druid by druid-io.
the class BrokerInternalQueryConfigTest method testDefaultBehavior.
/**
* Test the behavior if the operator does not specify anything for druid.broker.internal.query.config.context in runtime.properties
*/
@Test
public void testDefaultBehavior() {
Injector injector = Guice.createInjector(new Module() {
@Override
public void configure(Binder binder) {
binder.install(new ConfigModule());
binder.install(new DruidGuiceExtensions());
JsonConfigProvider.bind(binder, "druid.broker.internal.query.config", BrokerInternalQueryConfig.class);
}
@Provides
@LazySingleton
public ObjectMapper jsonMapper() {
return new DefaultObjectMapper();
}
});
BrokerInternalQueryConfig config = injector.getInstance(BrokerInternalQueryConfig.class);
Assert.assertEquals(ImmutableMap.of(), config.getContext());
}
Aggregations