class CoordinatesValidator implements ConstraintValidator<ValidCoordinates, RectangularBox> {

    @Override
    public boolean isValid(RectangularBox value, ConstraintValidatorContext context) {
        if (value != null) {
            return value.getTop() > value.getBottom() && value.getRight() > value.getLeft();
        }
        return true;
    }

}

class CoordinatesValidatorTest {

    private CoordinatesValidator victim;
    private RectangularBox box;

    @Test
    public void testNull() {

        assertTrue(victim.isValid(null, null));
    }

}