### Question:
FileAssistant { public static String readFile(String fileName) throws IOException { logger.entering(fileName); Preconditions.checkArgument(StringUtils.isNotBlank(fileName), "File name cannot be null (or) empty."); StringBuilder output = new StringBuilder(); try (BufferedReader buffreader = new BufferedReader(new InputStreamReader(loadFile(fileName), Charset.forName("UTF-8")))) { String line = null; while ((line = buffreader.readLine()) != null) { output.append(line); } } logger.exiting(output); return output.toString(); } private  FileAssistant(); static InputStream loadFile(String fileName); static InputStream loadFile(File file); static String readFile(String fileName); static void writeStreamToFile(InputStream isr, String fileName, String outputFolder);  }### Answer:
@Test(groups = "unit") public void testReadFile() throws IOException { String contents = FileAssistant.readFile("src/test/resources/List.yaml"); assertNotNull(contents, "File contents check"); assertTrue(contents.contains("Block list of strings"), "File contents check"); }
@Test(groups = "unit", expectedExceptions = { IllegalArgumentException.class }) public void testReadFileErrorConditionEmptyFileName() throws IOException { FileAssistant.readFile(" "); }
@Test(groups = "unit", expectedExceptions = { IllegalArgumentException.class }) public void testReadFileErrorConditionNullFileName() throws IOException { FileAssistant.readFile(null); }