BQCoreModuleExtender extends ModuleExtender<BQCoreModuleExtender> { public BQCoreModuleExtender addOptions(OptionMetadata... options) { if (options != null) { asList(options).forEach(this::addOption); } return this; } protected  BQCoreModuleExtender(Binder binder); @Override BQCoreModuleExtender initAllExtensions(); BQCoreModuleExtender setDefaultCommand(Class<? extends Command> commandType); BQCoreModuleExtender setDefaultCommand(Command command); BQCoreModuleExtender setApplicationDescription(String description); BQCoreModuleExtender setLogLevel(String name, Level level); BQCoreModuleExtender setLogLevels(Map<String, Level> levels); BQCoreModuleExtender setProperty(String name, String value); BQCoreModuleExtender setProperties(Map<String, String> properties); BQCoreModuleExtender setVar(String name, String value); BQCoreModuleExtender setVars(Map<String, String> vars); BQCoreModuleExtender declareVar(String configPath, String name); BQCoreModuleExtender declareVar(String configPath, String name, String description); BQCoreModuleExtender declareVars(Map<String, String> varsByConfigPaths); BQCoreModuleExtender addConfig(String configResourceId); BQCoreModuleExtender addPostConfig(String configResourceId); BQCoreModuleExtender mapConfigResource(String optionName, String configResourceId); BQCoreModuleExtender mapConfigPath(String optionName, String configPath); BQCoreModuleExtender addOption(OptionMetadata option); BQCoreModuleExtender addOptions(OptionMetadata... options); BQCoreModuleExtender addCommand(Command command); BQCoreModuleExtender addCommand(Class<? extends Command> commandType); BQCoreModuleExtender decorateCommand(Class<? extends Command> commandType, CommandDecorator commandDecorator); BQCoreModuleExtender addValueObjectsDescriptors(Map<Class<?>, ValueObjectDescriptor> valueObjectsDescriptors); BQCoreModuleExtender addValueObjectDescriptor(Class<?> object, ValueObjectDescriptor valueObjectsDescriptor);  }
@Test public void testSetOptions() { OptionMetadata o1 = OptionMetadata.builder("o1").build(); OptionMetadata o2 = OptionMetadata.builder("o2").build(); Injector i = DIBootstrap.createInjector(b -> { BQCoreModule.extend(b).addOptions(o1, o2); b.bind(OptionsInspector.class); }); OptionsInspector inspector = i.getInstance(OptionsInspector.class); assertEquals(2, inspector.options.size()); assertTrue(inspector.options.contains(o1)); assertTrue(inspector.options.contains(o2)); }