ConfigValue implements Serializable { ImmutableMap<String, String> getValuesByPrefixedKeys(String constant) { return prefixedValues.entrySet().stream() .collect(ImmutableMap.toImmutableMap( e -> getPrefixedConfigString(e.getKey(), constant), Entry::getValue)); } ConfigValue(String currentValue, ImmutableMap<ImmutableSet<String>, String> prefixedValues);   }
@Test void testCase_getValuesByPrefixedKeys() { ImmutableMap<String, String> expectedValuesByPrefixedKey = ImmutableMap.of( "Prefix1@VALUE", "2", "Prefix2@Prefix3@VALUE", "3", "Prefix4@VALUE", "4"); assertThat(configValue.getValuesByPrefixedKeys("VALUE")).isEqualTo(expectedValuesByPrefixedKey); }