{
final String KEY = "Schl\u00fcssel \u00e4";
final String VALUE_1 = "Wert 1";
final String VALUE_2 = "Wert 2";
CustomProperty cp;
CustomProperties cps = new CustomProperties();
assertEquals(0, cps.size());
/* After adding a custom property the size must be 1 and it must be
* possible to extract the custom property from the map. */
cps.put(KEY, VALUE_1);
assertEquals(1, cps.size());
Object v1 = cps.get(KEY);
assertEquals(VALUE_1, v1);
/* After adding a custom property with the same name the size must still
* be one. */
cps.put(KEY, VALUE_2);
assertEquals(1, cps.size());
Object v2 = cps.get(KEY);
assertEquals(VALUE_2, v2);
/* Removing the custom property must return the remove property and
* reduce the size to 0. */
cp = (CustomProperty) cps.remove(KEY);
assertEquals(KEY, cp.getName());
assertEquals(VALUE_2, cp.getValue());
assertEquals(0, cps.size());
}