### Question:
LinearTransactionCostCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(Num criterionValue1, Num criterionValue2) { return criterionValue1.isLessThan(criterionValue2); } LinearTransactionCostCriterion(double initialAmount, double a);  LinearTransactionCostCriterion(double initialAmount, double a, double b); @Override Num calculate(BarSeries series, Trade trade); @Override Num calculate(BarSeries series, TradingRecord tradingRecord); @Override boolean betterThan(Num criterionValue1, Num criterionValue2);  }### Answer:
@Test public void betterThan() { AnalysisCriterion criterion = new LinearTransactionCostCriterion(1000, 0.5); assertTrue(criterion.betterThan(numOf(3.1), numOf(4.2))); assertFalse(criterion.betterThan(numOf(2.1), numOf(1.9))); }