### Question:
FileHelper { public static FileWithParametersBuilder fromFileWithParameters(String filename) { return fromFileWithParameters(filename, DEFAULT_ENCODING); } private  FileHelper(); static String fromFile(String fileName, String encoding); static String fromFile(String fileName); static FileWithParametersBuilder fromFileWithParameters(String filename); static FileWithParametersBuilder fromFileWithParameters(String filename, String encoding);  }### Answer:
@Test public void replaceParameter() { String fileContent = FileHelper.fromFileWithParameters("parameter.txt").withParameter("name", "Andrew").toString(); assertThat(fileContent, is("Hello Andrew\nGoodbye Andrew")); }
@Test public void replaceParameterInAscii() { String fileContent = FileHelper.fromFileWithParameters("parameter.txt", "ASCII").withParameter("name", "Andrew").toString(); assertThat(fileContent, is("Hello Andrew\nGoodbye Andrew")); }
@Test public void replaceParameters() { Map<String, String> parameters = new HashMap<String, String>() { { put("greeting", "Hello"); put("thing", "world"); } }; String fileContent = FileHelper.fromFileWithParameters("parameters.txt").withParameters(parameters).toString(); assertThat(fileContent, is("Hello, world!")); }