### Question:
MinValidatorForNumber implements ConstraintValidator<Min, Number> { public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext) { if ( value == null ) { return true; } if ( value instanceof BigDecimal ) { return ( ( BigDecimal ) value ).compareTo( BigDecimal.valueOf( minValue ) ) != -1; } else if ( value instanceof BigInteger ) { return ( ( BigInteger ) value ).compareTo( BigInteger.valueOf( minValue ) ) != -1; } else { double doubleValue = value.doubleValue(); return doubleValue >= minValue; } }  void initialize(Min minValue); boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext);  }### Answer:
@Test public void testIsValid() { byte b = 1; Byte bWrapper = 127; assertTrue( constraint.isValid( null, null ) ); assertTrue( constraint.isValid( bWrapper, null ) ); assertTrue( constraint.isValid( 20, null ) ); assertTrue( constraint.isValid( 15l, null ) ); assertTrue( constraint.isValid( 15, null ) ); assertTrue( constraint.isValid( 15.0, null ) ); assertTrue( constraint.isValid( BigDecimal.valueOf( 156000000000.0 ), null ) ); assertTrue( constraint.isValid( BigInteger.valueOf( 10000000l ), null ) ); assertFalse( constraint.isValid( b, null ) ); assertFalse( constraint.isValid( BigDecimal.valueOf( -156000000000.0 ), null ) ); assertFalse( constraint.isValid( BigInteger.valueOf( -10000000l ), null ) ); assertFalse( constraint.isValid( 10, null ) ); assertFalse( constraint.isValid( 14.99, null ) ); assertFalse( constraint.isValid( -14.99, null ) ); }