ConfigModule implements BQModule { protected <T> T config(Class<T> type, ConfigurationFactory configurationFactory) { return configurationFactory.config(type, getConfigPrefix()); } ConfigModule();  ConfigModule(String configPrefix); @Override void configure(Binder binder);  }
@Test public void testConfigConfig() { ConfigurationFactory f = mock(ConfigurationFactory.class); when(f.config(any(Class.class), anyString())) .then(a -> "_"+ a.getArgument(1)); TestXyzModule m = new TestXyzModule(); String v = m.config(String.class, f); assertEquals("_testxyz", v); }