### Question:
PropertiesFormat implements ConfijFormat { protected Map<String, String> flatmapPrefixedBy(@NonNull Map<String, String> map, String prefix) { if (prefix == null) { return map; } String prefixAndSep = prefix + getSeparator(); Map<String, String> result = new HashMap<>(); map.forEach((k, v) -> { if (k.startsWith(prefixAndSep)) { result.put(k.substring(prefixAndSep.length()), v); } }); return result; } PropertiesFormat(); static PropertiesFormat withoutPrefix(); @Override void override(ConfijNode rootNode, String configAsStr);  }### Answer:
@Test void flatmapSoloKey() { assertThat(flatmapPrefixedBy("", null)).isEmpty(); assertThat(flatmapPrefixedBy("a.b.c=value", null)).containsOnlyKeys("a.b.c") .containsValue("value"); assertThat(flatmapPrefixedBy("a.b.c=value", "a")).containsOnlyKeys("b.c") .containsValue("value"); assertThat(flatmapPrefixedBy("a.b.c=value", "a.b")).containsOnlyKeys("c") .containsValue("value"); }
@Test void flatmapIgnoringUnknownKeys() { assertThat(flatmapPrefixedBy("", "a")).isEmpty(); assertThat(flatmapPrefixedBy("a.b.c=value", "b")).isEmpty(); assertThat(flatmapPrefixedBy("fuu=bar|a.b.c=value", "a")).containsOnlyKeys("b.c"); }
@Test void flatmapMultiKey() { String testString = "a.b.c=value|a.x.y=value2|fuu=bar"; assertThat(flatmapPrefixedBy(testString, null)).containsOnlyKeys("a.b.c", "a.x.y", "fuu"); assertThat(flatmapPrefixedBy(testString, "a")).containsOnlyKeys("b.c", "x.y"); assertThat(flatmapPrefixedBy(testString, "a.b")).containsOnlyKeys("c"); }