### Question:
App { public static List<Double> compute() throws FileNotFoundException { File file = new File("data"); List<Double> normalized = new ArrayList<>(); Scanner scanner = new Scanner(file); List<Double> numbers = new ArrayList<>(); while (scanner.hasNextDouble()) { double number = scanner.nextDouble(); numbers.add(number); } double sum = 0; for (double f : numbers) { sum += f; } double mean = sum / numbers.size(); double sumSquare = 0; for (double f : numbers) { double diff = f - mean; sumSquare += diff * diff; } double std = Math.sqrt(sumSquare / numbers.size()); for (double f : numbers) { normalized.add((f - mean) / std); } System.out.println(normalized); try { FileWriter fw = new FileWriter("output"); for (double n : normalized) { fw.write(Double.toString(n)); fw.write("\n"); } fw.close(); } catch (Exception e) { System.out.println("Error writing output file"); } System.out.println("Wrote output file."); scanner.close(); return normalized; }  static void main(String[] args); static List<Double> compute();  }### Answer:
@Test public void computeYieldsCorrectResult() throws FileNotFoundException { List<Double> normalized = App.compute(); List<Double> expected = Arrays.asList( -1.5666989036012806, -1.2185435916898848, -0.8703882797784892, -0.5222329678670935, -0.17407765595569785, 0.17407765595569785, 0.5222329678670935, 0.8703882797784892, 1.2185435916898848, 1.5666989036012806 ); assertEquals(expected, normalized); }