DefaultValueContainer implements SimpleValueContainer { public void configureAnonymizeValue(String key, String anonymizeValue) { anonymizeConfig.put(key, anonymizeValue); } DefaultValueContainer();  DefaultValueContainer(String nullString);  DefaultValueContainer(ValueContainer cloneSource); protected  DefaultValueContainer(String nullString, SortedMap<String, String> attributes); @Override SortedMap<String, String> getAttributes(); @Override String getNullString(); Map<String, String> getAnonymizeConfig(); @Override SortedMap<String, String> compare(ValueContainer originalState); @Override SortedMap<String, String> getChanges(); @Override void put(String key, String value); @Override void put(String key, V value, ValueFormatter<V> valueFormatter); @Override void put(String key, Boolean value); @Override void put(String key, Number value); @Override void put(String key, Enum<?> value); @Override void put(String key, Date date, String datePattern); void configureAnonymizeValue(String key, String anonymizeValue);  }
@Test public void testConfigureAnonymizeValue() { DefaultValueContainer cut = new DefaultValueContainer(); String criticalKey = "critical"; String anonymizeValue = "----"; cut.configureAnonymizeValue(criticalKey, anonymizeValue); assertThat(cut.getAnonymizeConfig().get(criticalKey), is(anonymizeValue)); assertTrue(cut.compare(new DefaultValueContainer()).isEmpty()); assertThat(cut.compare(new DefaultValueContainer()).get(criticalKey), is(nullValue())); cut.put(criticalKey, "dontReturnMeInCompare"); assertThat(cut.compare(new DefaultValueContainer()).get(criticalKey), is(anonymizeValue)); }