### Question:
TotalProfitCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 > criterionValue2; }  @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override double calculate(TimeSeries series, Trade trade); @Override boolean betterThan(double criterionValue1, double criterionValue2);  }### Answer:
@Test public void betterThan() { AnalysisCriterion criterion = new TotalProfitCriterion(); assertTrue(criterion.betterThan(2.0, 1.5)); assertFalse(criterion.betterThan(1.5, 2.0)); }