### Question:
LoadingTimes { public void dump(File file) throws FileNotFoundException, UnsupportedEncodingException { PrintWriter writer = new PrintWriter(file, "UTF-8"); dump(writer); } LoadingTimes(List<String> actions, List<Long> waitingTimes, List<Date> actionTimestamps); static LoadingTimes empty(); void dump(File file); void dump(String fileName);  }### Answer:
@Test public void loadingTimesDumpsFile() throws UnsupportedEncodingException, FileNotFoundException { List<Long> loadingMeasurements = new ArrayList<>(); List<String> actions = new ArrayList<>(); List<Date> actionTimestamps = new ArrayList<>(); actions.add("INITIAL_LOADING"); loadingMeasurements.add(756661733L); actions.add("CLICK_ON_BUTTON"); loadingMeasurements.add(750434651L); actionTimestamps.add(new Date()); actionTimestamps.add(new Date()); actionTimestamps.add(new Date()); LoadingTimes loadingTimes = new LoadingTimes(actions, loadingMeasurements, actionTimestamps); loadingTimes.dump(file); Assert.assertTrue(file.exists()); Assert.assertTrue(file.delete()); loadingTimes.dump(pathname); Assert.assertTrue(file.exists()); Assert.assertTrue(file.delete()); }