### Question:
App { public static List<Double> loadFromFile(String filepath) throws FileNotFoundException { File file = new File(filepath); Scanner scanner = new Scanner(file); List<Double> numbers = new ArrayList<>(); while (scanner.hasNextDouble()) { double number = scanner.nextDouble(); numbers.add(number); } scanner.close(); return numbers; }  static void main(String[] args); static List<Double> compute(); static List<Double> loadFromFile(String filepath); static double mean(List<Double> numbers); static double std(List<Double> numbers, double mean); static List<Double> normalize(List<Double> numbers, double mean, double std); static void writeToFile(List<Double> numbers);  }### Answer:
@Test public void loadCorrectFile() throws FileNotFoundException { List<Double> expected = Arrays.asList(1d,2d,3d,4d,5d,6d,7d,8d,9d,10d); List<Double> loaded = App.loadFromFile("data"); assertEquals(expected, loaded); }
@Test public void loadWrongFileThrows() throws FileNotFoundException { assertThrows(FileNotFoundException.class, () -> { App.loadFromFile("loremipsum"); }); }