CalibrationTimeouts { public HashMap<String, CalibrationTimeout> getAllCalibrationTimeouts() { HashMap<String, CalibrationTimeout> calibrationTimeoutsHashMap = new HashMap<>(); for (CalibrationTimeout timeout : calibrationTimeouts) { calibrationTimeoutsHashMap.put(timeout.getCalibrationTimeoutKey(), timeout); } return calibrationTimeoutsHashMap; } 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 testConstructorOwnTimeouts() throws Exception { ArrayList<CalibrationTimeout> calibrationTimeoutList = new ArrayList<>(); calibrationTimeouts = new CalibrationTimeouts(calibrationTimeoutList); assertNotNull("The value shouldn't be null.", calibrationTimeouts.getAllCalibrationTimeouts()); assertEquals("The values sizes be equal.", calibrationTimeoutList.size(), calibrationTimeouts.getAllCalibrationTimeouts().size()); }
@Test public void testGetAllCalibrationTimeouts() throws Exception { CalibrationTimeout calibrationTimeout = new CalibrationTimeout("ode", "deploy", "maven", 20_000, 2_000); CalibrationTimeout calibrationTimeoutTest = new CalibrationTimeout("tomcat", "startup", "maven", 30_000, 4_000); calibrationTimeouts.addCalibrationTimeout(calibrationTimeout); calibrationTimeouts.addCalibrationTimeout(calibrationTimeoutTest); HashMap<String, CalibrationTimeout> timeouts = calibrationTimeouts.getAllCalibrationTimeouts(); assertEquals("The values should be equal.", calibrationTimeout, timeouts.get(calibrationTimeout.getCalibrationTimeoutKey())); assertEquals("The values should be equal.", calibrationTimeoutTest, timeouts.get(calibrationTimeoutTest.getCalibrationTimeoutKey())); }