// Replace all
newMetadata = new HashMap<String, Object>();
newMetadata.put("one", "1st");
newMetadata.put("TWO", "2nd");
newMetadata.put("THRee", "3rd");
obj.replaceAllMetadata(newMetadata);
assertEquals(3, obj.getMetadataMap().size());
assertEquals("1st", obj.getMetadata("ONE"));
assertEquals("2nd", obj.getMetadata("two"));
assertEquals("3rd", obj.getMetadata("thrEE"));
}