PeList { public static <T extends Pe> void setStatusFailed( List<T> peList, String resName, int hostId, boolean failed) { String status = null; if (failed) { status = "FAILED"; } else { status = "WORKING"; } Log.printConcatLine(resName, " - Machine: ", hostId, " is ", status); setStatusFailed(peList, failed); }  static Pe getById(List<T> peList, int id); static int getMips(List<T> peList, int id); static int getTotalMips(List<T> peList); static double getMaxUtilization(List<T> peList); static double getMaxUtilizationAmongVmsPes(List<T> peList, Vm vm); static Pe getFreePe(List<T> peList); static int getNumberOfFreePes(List<T> peList); static boolean setPeStatus(List<T> peList, int id, int status); static int getNumberOfBusyPes(List<T> peList); static void setStatusFailed(
			List<T> peList,
			String resName,
			int hostId,
			boolean failed); static void setStatusFailed(List<T> peList, boolean failed);  }
@Test public void testSetStatusFailed() { assertEquals(Pe.FREE, PeList.getById(peList, 0).getStatus()); assertEquals(Pe.FREE, PeList.getById(peList, 1).getStatus()); PeList.setStatusFailed(peList, true); assertEquals(Pe.FAILED, PeList.getById(peList, 0).getStatus()); assertEquals(Pe.FAILED, PeList.getById(peList, 1).getStatus()); PeList.setStatusFailed(peList, false); assertEquals(Pe.FREE, PeList.getById(peList, 0).getStatus()); assertEquals(Pe.FREE, PeList.getById(peList, 1).getStatus()); PeList.setStatusFailed(peList, "test", 0, true); assertEquals(Pe.FAILED, PeList.getById(peList, 0).getStatus()); assertEquals(Pe.FAILED, PeList.getById(peList, 1).getStatus()); PeList.setStatusFailed(peList, "test", 0, false); assertEquals(Pe.FREE, PeList.getById(peList, 0).getStatus()); assertEquals(Pe.FREE, PeList.getById(peList, 1).getStatus()); }