@Test
 public void shouldNotCreatePackageRepositoryWhenRepositoryHasDuplicateConfigurationProperties()
     throws Exception {
   ConfigurationProperty property =
       new ConfigurationProperty(new ConfigurationKey("foo"), new ConfigurationValue("bar"));
   Configuration configuration = new Configuration(property, property);
   packageRepository.setConfiguration(configuration);
   CreatePackageRepositoryCommand command =
       new CreatePackageRepositoryCommand(
           goConfigService, packageRepositoryService, packageRepository, currentUser, result);
   assertFalse(command.isValid(cruiseConfig));
   assertThat(
       property.errors().firstError(), is("Duplicate key 'foo' found for Repository 'npmOrg'"));
 }