### Question:
PayaraConfig implements Config { @Override public Iterable<String> getPropertyNames() { List<String> result = new ArrayList<>(); for (ConfigSource configSource : sources) { result.addAll(configSource.getProperties().keySet()); } return result; } PayaraConfig(List<ConfigSource> configSources, Map<Class<?>,Converter<?>> converters);  PayaraConfig(List<ConfigSource> sources, Map<Class<?>,Converter<?>> converters, long ttl); @SuppressWarnings("unchecked") @Override T getValue(String propertyName, Class<T> propertyType); @Override Optional<T> getOptionalValue(String propertyName, Class<T> propertyType); @Override Iterable<String> getPropertyNames(); @Override Iterable<ConfigSource> getConfigSources(); Set<Class<?>> getConverterTypes(); @SuppressWarnings("unchecked") T getValue(String propertyName, String cacheKey, Long ttl, String defaultValue, Supplier<? extends Converter<T>> converter); @SuppressWarnings("unchecked") Converter<T> getConverter(Class<T> propertyType);  }### Answer:
@Test public void getPropertyNamesContainsPeopertiesOfAllSources() { HashSet<String> actual = new HashSet<>(); config.getPropertyNames().forEach(e -> actual.add(e)); assertEquals(new HashSet<>(asList("key1", "key2", "bool2", "int1", "int2", "brokenarr")), actual); }