### Question:
RocCurves implements Iterable<RocCurves.EvaluationPoint>, Graph { RocCurves(List<ResultEntry> results) { this.results = new ArrayList<>(results); Collections.sort(this.results); int positives = 0; int negatives = 0; for (ResultEntry result : this.results) { if (result.trueCategory) { positives++; } else { negatives++; } } this.positives = positives; this.negatives = negatives; } RocCurves(List<ResultEntry> results); ConfusionMatrix getConfusionMatrix(double threshold); @Override Iterator<EvaluationPoint> iterator(); double getAreaUnderCurve(); @Deprecated void showCurves(); @Deprecated void saveCurves(File file); @Override void show(); @Override void save(File file); void writeEntries(PrintStream stream, char separator); MccAtThreshold determineBestMCC(int numSteps);  }### Answer:
@Test public void testRocCurves() throws Exception { List<RocCurves.ResultEntry> results = new ArrayList<>(); results.add(new RocCurves.ResultEntry(true, 1)); results.add(new RocCurves.ResultEntry(false, 0.895)); results.add(new RocCurves.ResultEntry(false, 0.894)); results.add(new RocCurves.ResultEntry(true, 0.856)); results.add(new RocCurves.ResultEntry(true, 0.833)); results.add(new RocCurves.ResultEntry(true, 0.723)); results.add(new RocCurves.ResultEntry(true, 0.703)); results.add(new RocCurves.ResultEntry(false, 0.674)); results.add(new RocCurves.ResultEntry(true, 0.651)); results.add(new RocCurves.ResultEntry(true, 0.589)); results.add(new RocCurves.ResultEntry(true, 0.548)); results.add(new RocCurves.ResultEntry(false, 0.37)); results.add(new RocCurves.ResultEntry(false, 0.363)); results.add(new RocCurves.ResultEntry(false, 0.338)); results.add(new RocCurves.ResultEntry(true, 0)); RocCurves rocCurves = new RocCurves(results); assertEquals(0.5741, rocCurves.getAreaUnderCurve(), 0.0001); }