### Question:
LocalConfigurationService implements LocalConfiguration, Serializable { @Override public Set<String> keys() { return rawDelegates .stream() .flatMap(d -> d.keys().stream()) .flatMap(k -> !k.startsWith(plugin + '.') ? Stream.of(k) : Stream.of(k, k.substring(plugin.length() + 1))) .collect(toSet()); }  @Override String get(final String key); @Override Set<String> keys();  }### Answer:
@Test void keys() { System.setProperty("LocalConfigurationServiceTest.test.foo", "1"); System.setProperty("LocalConfigurationServiceTest.test.bar", "1"); try { assertEquals(Stream.of("test.foo", "test.bar").collect(toSet()), new LocalConfigurationService(singletonList(systemProperties), "LocalConfigurationServiceTest") .keys() .stream() .filter(it -> it.startsWith("test")) .collect(toSet())); } finally { System.clearProperty("LocalConfigurationServiceTest.test.foo"); System.clearProperty("LocalConfigurationServiceTest.test.bar"); } }