### Question:
MigrationConfigurationFactoryImpl extends ConfigurationFactoryImpl implements ConfigurationFactory { @Override public ConfigGroup newConfigGroup(ConfigType type, final String name, final String description) { if (ConfigType.SPACE.equals(type)) { type = ConfigType.ORGANIZATIONAL_UNIT; } final ConfigGroup configGroup = new ConfigGroup(); configGroup.setDescription(description); configGroup.setName(name); configGroup.setType(type); configGroup.setEnabled(true); return configGroup; } MigrationConfigurationFactoryImpl(); @Inject  MigrationConfigurationFactoryImpl(final PasswordService secureService); @Override ConfigGroup newConfigGroup(ConfigType type,
                                      final String name,
                                      final String description); @Override ConfigGroup newConfigGroup(final ConfigType type,
                                      final String namespace,
                                      final String name,
                                      final String description);  }### Answer:
@Test public void newConfigGroupWithoutNamespaceTest() { final ConfigGroup configGroup = configurationFactory.newConfigGroup(ConfigType.GLOBAL, "my-config", "my-description"); assertEquals(ConfigType.GLOBAL, configGroup.getType()); assertEquals("my-config", configGroup.getName()); assertEquals("my-description", configGroup.getDescription()); assertTrue(configGroup.isEnabled()); }
@Test public void newConfigGroupWithNamespaceTest() { final ConfigGroup configGroup = configurationFactory.newConfigGroup(ConfigType.REPOSITORY, "my-namespace", "my-config", "my-description"); assertEquals(ConfigType.REPOSITORY, configGroup.getType()); assertEquals("my-config", configGroup.getName()); assertEquals("my-description", configGroup.getDescription()); assertTrue(configGroup.isEnabled()); }