RepositoryConfigurations { public Set<RepositoryName> getAllConfigurationNames() { return repositoryConfigurations.keySet(); }  void add(RepositoryConfiguration repositoryConfiguration); RepositoryConfiguration getConfiguration(RepositoryName name); RepositoryConfiguration remove(RepositoryName name); Collection<RepositoryConfiguration> getAllConfigurations(); boolean containsConfiguration(RepositoryName repositoryName); Set<RepositoryName> getAllConfigurationNames(); int count(); ConfigsDiff diffByRepositoryName(RepositoryConfigurations configsToCompare); void apply(ConfigsDiff diff);  }
@Test public void getAllConfigurationNames() { configs.add(cheeseConfig); configs.add(hamConfig); Set<RepositoryName> names = configs.getAllConfigurationNames(); assertThat(names.size(), is(2)); assertThat(names.contains(hamConfig.getName()), is(true)); assertThat(names.contains(cheeseConfig.getName()), is(true)); }