### Question:
HierarchicalLoader implements ConfigurationLoader { @Override public Properties loadConfigurations() { return properties; } private  HierarchicalLoader(Properties properties); @Override Properties loadConfigurations();  }### Answer:
@Test public void builder() { String keyDuplicate = "test.test"; String keyA = "testA"; String keyB = "testB"; Map<String, String> propertiesA = new HashMap<>(); Map<String, String> propertiesB = new HashMap<>(); propertiesA.put(keyDuplicate, "value.value"); propertiesA.put(keyA, "valueA.value"); propertiesB.put(keyDuplicate, "valueB.value"); propertiesB.put(keyB, "valueB.value"); DummyLoader dummyLoaderA = new DummyLoader(propertiesA); DummyLoader dummyLoaderB = new DummyLoader(propertiesB); ConfigurationLoader configurationLoader = new HierarchicalLoader.Builder() .addLoader(dummyLoaderA) .addLoader(dummyLoaderB).build(); Properties properties = configurationLoader.loadConfigurations(); assertNotNull(properties); assertEquals("valueB.value", properties.getProperty(keyDuplicate)); assertEquals("valueA.value", properties.getProperty(keyA)); assertEquals("valueB.value", properties.getProperty(keyB)); assertNull(properties.getProperty("not found")); }