NumericTransformer extends Transformer { public void defaults(double best, double worst) { threshold1 = worst; threshold5 = best; threshold2 = worst + ((best - worst) / 4); threshold3 = worst + ((best - worst) / 4) * 2; threshold4 = worst + ((best - worst) / 4) * 3; }  void setMode(TransformationMode mode); void defaults(double best, double worst); boolean hasIncreasingOrder(); double transformBack(double targetValue); TargetValue transform(INumericValue v); TargetValue transform(IOrdinalValue v); TransformationMode getMode(); boolean checkOrder(); boolean isTransformable(List<ValidationError> errors); @Override Transformer clone(); Double getThreshold1(); void setThreshold1(Double threshold1); Double getThreshold2(); void setThreshold2(Double threshold2); Double getThreshold3(); void setThreshold3(Double threshold3); Double getThreshold4(); void setThreshold4(Double threshold4); Double getThreshold5(); void setThreshold5(Double threshold5);  }
@Test public void testDefaults() { NumericTransformer numTran = new NumericTransformer(); numTran.defaults(5, 1); Assert.assertTrue(numTran.getThreshold1() == 1); Assert.assertTrue(numTran.getThreshold2() == 2); Assert.assertTrue(numTran.getThreshold3() == 3); Assert.assertTrue(numTran.getThreshold4() == 4); Assert.assertTrue(numTran.getThreshold5() == 5); numTran.defaults(1.2, 0.8); Assert.assertTrue(numTran.getThreshold1() == 0.8); Assert.assertTrue(numTran.getThreshold2() == 0.9); Assert.assertTrue(numTran.getThreshold3() == 1.0); Assert.assertTrue(numTran.getThreshold4() == 1.1); Assert.assertTrue(numTran.getThreshold5() == 1.2); }