### Question:
FileSettingsReader { public void readIntoMap(SettingsMap settings, BufferedReader fileContents) throws IOException { int lineNumber = 0; String thisLine; while ((thisLine = fileContents.readLine()) != null) { lineNumber++; if (thisLine.trim().isEmpty()) { } else if (thisLine.startsWith("#") || thisLine.startsWith("<")) { } else if (thisLine.contains(":") || thisLine.toLowerCase().contains("(")) { if (thisLine.contains("(") && (!thisLine.contains(":") || thisLine.indexOf('(') < thisLine.indexOf(':'))) { String configFunction = thisLine.trim(); settings.addRawSetting(RawSettingValue.create(ValueType.FUNCTION, configFunction).withLineNumber(lineNumber)); } else { settings.addRawSetting(RawSettingValue.create(ValueType.PLAIN_SETTING, thisLine.trim()).withLineNumber(lineNumber)); } } else if (thisLine.contains("=")) { String modifiedLine = thisLine.replaceFirst("=", ":").trim(); settings.addRawSetting(RawSettingValue.create(ValueType.PLAIN_SETTING, modifiedLine).withLineNumber(lineNumber)); } } }  static SettingsMap read(String configName, File file); void readIntoMap(SettingsMap settings, BufferedReader fileContents); void readIntoMap(SettingsMap settings, File file);  }### Answer:
@Test public void testReading() throws IOException { FileSettingsReader reader = new FileSettingsReader(); SettingsMap settingsMap = new SimpleSettingsMap("Test", false); BufferedReader fileContents = new BufferedReader(new StringReader(fileContentsString)); reader.readIntoMap(settingsMap, fileContents); assertEquals("TerrainControl", settingsMap.getSetting(WorldStandardValues.AUTHOR)); assertEquals("File to test setting reading", settingsMap.getSetting(WorldStandardValues.DESCRIPTION)); Iterator<RawSettingValue> it = settingsMap.getRawSettings().iterator(); assertEquals("Author: TerrainControl", it.next().getRawValue()); assertEquals("Description: File to test setting reading", it.next().getRawValue()); }