### Question:
ConfigUtils { public static Config overlayOn(Map<String,?> overlay, Config underlying) { StringBuilder configFileString = new StringBuilder(); overlay.forEach((k, v) -> configFileString.append(k).append('=').append(v).append('\n')); String configFile = configFileString.toString(); log.debug("Overlaid config: \n{}", configFile); return ConfigFactory.parseString(configFile).resolve().withFallback(underlying); } private  ConfigUtils(); static Config getDefault(); static Config overlayOn(Map<String,?> overlay, Config underlying); static String getOptionalString(Config config, String key); static List<String> getOptionalStringList(Config config, String key); static Double getOptionalDouble(Config config, String key); static void set(Map<String,Object> overlay, String key, Path path); static String serialize(Config config); static Config deserialize(String serialized); static String prettyPrint(Config config); static Properties keyValueToProperties(Object... keyValues);  }### Answer:
@Test public void testOverlayOn() { Map<String,Object> overlay = new HashMap<>(); overlay.put("foo", "bar"); Config config = ConfigUtils.overlayOn(overlay, ConfigUtils.getDefault()); assertEquals("bar", config.getString("foo")); }