@Test public void testCUT() { CUT cut = new CUT(); cut.setFullNameOfTargetClass("foo.Bar"); Project project = new Project(); project.getCut().add(cut); Assert.assertNull(ProjectUtil.getCUT(project, "invalid.ClassName")); Assert.assertNotNull(ProjectUtil.getCUT(project, "foo.Bar")); }
public static CUT getCUT(Project project, String className) { return project.getCut().parallelStream() .filter(p -> p.getFullNameOfTargetClass().equals(className)).findFirst().orElse(null); }
ProjectUtil { public static CUT getCUT(Project project, String className) { return project.getCut().parallelStream() .filter(p -> p.getFullNameOfTargetClass().equals(className)).findFirst().orElse(null); } }
ProjectUtil { public static CUT getCUT(Project project, String className) { return project.getCut().parallelStream() .filter(p -> p.getFullNameOfTargetClass().equals(className)).findFirst().orElse(null); }  }
ProjectUtil { public static CUT getCUT(Project project, String className) { return project.getCut().parallelStream() .filter(p -> p.getFullNameOfTargetClass().equals(className)).findFirst().orElse(null); }  static int getTotalNumberTestedClasses(Project project); static int getNumberLatestTestedClasses(Project project); static int getNumberTestableClasses(Project project); static int getTotalEffort(Project project); static int getTimeBudget(Project project); static int getNumberGeneratedTestSuites(Project project); static Set<String> getUnionCriteria(Project project); static double getAverageNumberStatements(Project project); static double getOverallCoverage(Project project); static double getAverageCriterionCoverage(Project project, String criterionName); static double getAverageNumberTests(Project project); static CUT getCUT(Project project, String className); }
ProjectUtil { public static CUT getCUT(Project project, String className) { return project.getCut().parallelStream() .filter(p -> p.getFullNameOfTargetClass().equals(className)).findFirst().orElse(null); }  static int getTotalNumberTestedClasses(Project project); static int getNumberLatestTestedClasses(Project project); static int getNumberTestableClasses(Project project); static int getTotalEffort(Project project); static int getTimeBudget(Project project); static int getNumberGeneratedTestSuites(Project project); static Set<String> getUnionCriteria(Project project); static double getAverageNumberStatements(Project project); static double getOverallCoverage(Project project); static double getAverageCriterionCoverage(Project project, String criterionName); static double getAverageNumberTests(Project project); static CUT getCUT(Project project, String className);  }