@Test
public void testClearMetadata() {

    Configuration configuration = generateConfiguration();
    configuration.addMetadata("keyVal", "foo", "bar");
    HashMap<String, Object> testMap = new HashMap<>();
    testMap.put("key1", "val1");
    testMap.put("key2", "val2");
    configuration.addMetadata("mapVal", testMap);
    configuration.clearMetadata("keyVal");
    configuration.clearMetadata("mapVal", "key2");
    assertNull(configuration.getMetadata("keyVal", "foo"));
    assertEquals("val1", configuration.getMetadata("mapVal", "key1"));
    assertNull(configuration.getMetadata("mapVal", "key2"));
}