@Test public void testLatestGeneration() { CUT cut = new CUT(); Generation g0 = new Generation(); g0.setId(XSDUtils.convert(0)); cut.getGeneration().add(g0); Generation g1 = new Generation(); g1.setId(XSDUtils.convert(1)); cut.getGeneration().add(g1); assertEquals(1, CUTUtil.getLatestGeneration(cut).getId().intValue()); }
public static Generation getLatestGeneration(CUT cut) { return cut.getGeneration().get(cut.getGeneration().size() - 1); }
CUTUtil { public static Generation getLatestGeneration(CUT cut) { return cut.getGeneration().get(cut.getGeneration().size() - 1); } }
CUTUtil { public static Generation getLatestGeneration(CUT cut) { return cut.getGeneration().get(cut.getGeneration().size() - 1); }  }
CUTUtil { public static Generation getLatestGeneration(CUT cut) { return cut.getGeneration().get(cut.getGeneration().size() - 1); }  static int getNumberStatements(CUT cut); static int getTotalEffort(CUT cut); static int getTimeBudget(CUT cut); static int getTotalEffort(CUT cut, int generationID); static int getTimeBudget(CUT cut, int generationID); static int getNumberTests(CUT cut); static Set<String> getCriteria(CUT cut); static double getCriterionCoverage(CUT cut, String criterionName); static double getOverallCoverage(CUT cut); static Generation getLatestGeneration(CUT cut); static Generation getLatestSuccessfulGeneration(CUT cut); }
CUTUtil { public static Generation getLatestGeneration(CUT cut) { return cut.getGeneration().get(cut.getGeneration().size() - 1); }  static int getNumberStatements(CUT cut); static int getTotalEffort(CUT cut); static int getTimeBudget(CUT cut); static int getTotalEffort(CUT cut, int generationID); static int getTimeBudget(CUT cut, int generationID); static int getNumberTests(CUT cut); static Set<String> getCriteria(CUT cut); static double getCriterionCoverage(CUT cut, String criterionName); static double getOverallCoverage(CUT cut); static Generation getLatestGeneration(CUT cut); static Generation getLatestSuccessfulGeneration(CUT cut);  }