CalibrationTimeoutRepository { public static HashMap<String, CalibrationTimeout> getAllCalibrationTimeouts() { return CALIBRATION_TIMEOUTS.getAllCalibrationTimeouts(); }  static HashMap<String, CalibrationTimeout> getAllCalibrationTimeouts(); static void addCalibrationTimeout(CalibrationTimeout calibrationTimeout); static void writeAllCalibrationTimeoutsToProperties(); static void writeToCSV(Path csv, int numberOfDuration); static void writeToCSV(); static void clean(); static HashMap<String, CalibrationTimeout> getAllNonRedundantTimeouts(); static final CalibrationTimeouts CALIBRATION_TIMEOUTS; }
@Test public void testGetAllCalibrationTimeouts() throws Exception { CalibrationTimeout secondCalibrationTimeout = new CalibrationTimeout("tomcat", "startup", "install", 50_000, 5_000); CalibrationTimeoutRepository.addCalibrationTimeout(calibrationTimeout); CalibrationTimeoutRepository.addCalibrationTimeout(secondCalibrationTimeout); HashMap<String, CalibrationTimeout> calibrationTimeoutList = CalibrationTimeoutRepository.getAllCalibrationTimeouts(); assertEquals("The keys should be equal.", calibrationTimeout.getKey(), calibrationTimeoutList.get(calibrationTimeout.getCalibrationTimeoutKey()).getKey()); assertEquals("The timeouts in ms should be equal.",calibrationTimeout.getTimeoutInMs(), calibrationTimeoutList.get(calibrationTimeout.getCalibrationTimeoutKey()).getTimeoutInMs()); assertEquals("The timeToRepetitions should be equal.", calibrationTimeout.getTimeToRepetitionInMs(), calibrationTimeoutList.get(calibrationTimeout.getCalibrationTimeoutKey()).getTimeToRepetitionInMs()); assertEquals("The keys should be equal.", secondCalibrationTimeout.getKey(), calibrationTimeoutList.get(secondCalibrationTimeout.getCalibrationTimeoutKey()).getKey()); assertEquals("The timeouts in ms should be equal.", secondCalibrationTimeout.getTimeoutInMs(), calibrationTimeoutList.get(secondCalibrationTimeout.getCalibrationTimeoutKey()).getTimeoutInMs()); assertEquals("The timeToRepetitions in ms should be equal.", secondCalibrationTimeout.getTimeToRepetitionInMs(), calibrationTimeoutList.get(secondCalibrationTimeout.getCalibrationTimeoutKey()).getTimeToRepetitionInMs()); }