### Question:
FileLoader implements Serializable { public String loadData() { var dataFileName = this.fileName; try (var br = new BufferedReader(new FileReader(new File(dataFileName)))) { var result = br.lines().collect(Collectors.joining("\n")); this.loaded = true; return result; } catch (Exception e) { LOGGER.error("File {} does not exist", dataFileName); } return null; }  String loadData(); void setFileName(String fileName); String getFileName(); boolean fileExists(); boolean isLoaded();  }### Answer:
@Test public void testLoadData() { final var fileLoader = new FileLoader(); fileLoader.setFileName("non-existing-file"); assertNull(fileLoader.loadData()); }