CalibrationTimeouts { public HashMap<String, CalibrationTimeout> getAllNonRedundantTimeouts() { HashMap<String, CalibrationTimeout> timeouts = getAllCalibrationTimeouts(); HashMap<String, CalibrationTimeout> calibrationTimeouts = new HashMap<>(); for (CalibrationTimeout calibrationTimeout : timeouts.values()) { if (!calibrationTimeouts.containsKey(calibrationTimeout.getKey())) { calibrationTimeouts.put(calibrationTimeout.getKey(), calibrationTimeout); } else if (calibrationTimeout.getStatus() == CalibrationTimeout.Status.EXCEEDED) { calibrationTimeouts.remove(calibrationTimeout.getKey()); calibrationTimeouts.put(calibrationTimeout.getKey(), calibrationTimeout); } } return calibrationTimeouts; } CalibrationTimeouts();  CalibrationTimeouts(ArrayList<CalibrationTimeout> calibrationTimeouts, String nameOfProperties, String nameOfCSV);  CalibrationTimeouts(String nameOfProperties, String nameOfCSV);  CalibrationTimeouts(ArrayList<CalibrationTimeout> calibrationTimeouts); void addCalibrationTimeout(CalibrationTimeout calibrationTimeout); CalibrationTimeout getCalibrationTimeout(String key); HashMap<String, CalibrationTimeout> getAllCalibrationTimeouts(); HashMap<String, CalibrationTimeout> getAllNonRedundantTimeouts(); void writeAllCalibrationTimeoutsToProperties(); void writeToCSV(Path csv, int numberOfDuration); void writeToCSV(); void clean();  }
@Test public void testGetAllNonRedundantTimeouts() throws Exception { CalibrationTimeout calibrationTimeout = new CalibrationTimeout("ode", "deploy", "maven", 20_000, 2_000); calibrationTimeouts.addCalibrationTimeout(calibrationTimeout); Thread.sleep(1); CalibrationTimeout calibrationTimeoutTest = new CalibrationTimeout("ode", "deploy", "maven", 70_000, 5_000); calibrationTimeouts.addCalibrationTimeout(calibrationTimeoutTest); HashMap<String, CalibrationTimeout> timeouts = calibrationTimeouts.getAllNonRedundantTimeouts(); assertEquals("The keys should be equal.", calibrationTimeoutTest.getKey(), timeouts.get(calibrationTimeout.getKey()).getKey()); }