### Question:
DoubleRangeValidator extends CustomValidator<Double> { public static DoubleRangeValidator exactly(double value, String errorMessage) { return new DoubleRangeValidator(value, value, errorMessage); } private  DoubleRangeValidator(double min, double max, String errorMessage); static DoubleRangeValidator between(double min, double max, String errorMessage); static DoubleRangeValidator atLeast(double min, String errorMessage); static DoubleRangeValidator upTo(double max, String errorMessage); static DoubleRangeValidator exactly(double value, String errorMessage);  }### Answer:
@Test public void exactlyTest() { DoubleRangeValidator i = DoubleRangeValidator.exactly(3.14, "test"); Assert.assertFalse(i.validate(-3.4).getResult()); Assert.assertFalse(i.validate(3.145).getResult()); Assert.assertTrue(i.validate(3.14).getResult()); Assert.assertFalse(i.validate(3.0).getResult()); Assert.assertFalse(i.validate(Double.MIN_VALUE).getResult()); }