### Question:
ConfigManager { public static final String getConfigAsString(ConfigKey key) { Object value = configMap.get(key); if ( value != null ) { if ( value instanceof Set ) { Set list = (Set)value; if ( list.size()>0 ) { return (String) list.iterator().next(); } else { return null; } } else { return value.toString(); } } return null; }  static final String getConfigAsString(ConfigKey key); static final Set<String> getConfigAsStringArray(ConfigKey key); static final void saveConfigKeyValue(ConfigKey key, String value); static final void saveConfigKeyValue(ConfigKey key, Collection<String> values); static final String DEFAULT_CONFIG_FILE_PATH; static final File DEFAULT_CONFIG_FILE; }### Answer:
@Test public void testGetConfigAsString() { String username = "test"; String password = "1234"; ConfigManager.saveConfigKeyValue(ConfigKey.adminUsername, username); ConfigManager.saveConfigKeyValue(ConfigKey.adminPassword, password); assertEquals(username, ConfigManager.getConfigAsString(ConfigKey.adminUsername)); assertEquals(password, ConfigManager.getConfigAsString(ConfigKey.adminPassword)); }