### Question:
FileUtils { public static String readFile(String fileName) throws IOException { String fileData = null; File file = FileUtils.locateFile(fileName); if (file != null) { fileData = new String(Files.readAllBytes(Paths.get(file.getAbsolutePath()))); } return fileData; } private  FileUtils(); static File locateFile(String fileName); static File locateDirectory(String directoryName); static String readFile(String fileName);  }### Answer:
@Test public void testReadConfigurationFile_Existing() throws IOException { String internalFileName = "/service-configuration.yml"; String result = FileUtils.readFile(internalFileName); assertNotNull(result); assertNotEquals(result.length(), -1); }
@Test public void readNotExistingConfiguration() throws IOException { String fileData = FileUtils.readFile("no-existing-file"); assertNull(fileData); }