### Question:
LongValidationRule extends SchemaValidationRule<Long> { @Override public void apply(Long value) throws ValidationException { if (minimum.isPresent()) { if (value < minimum.get()) { throw ValidationExceptionBuilder .<Long>numericRuleExceptionBuilder() .failingLowerBound() .withValue(value) .withBound(minimum.get()) .build(); } } if (maximum.isPresent()) { if (value > maximum.get()) { throw ValidationExceptionBuilder .<Long>numericRuleExceptionBuilder() .failingUpperBound() .withValue(value) .withBound(maximum.get()) .build(); } } return; } private  LongValidationRule(); @Override void apply(Long value); static LongValidationRule.Builder longValidationRuleBuilder(); Optional<Long> getMinimum(); Optional<Long> getMaximum();  }### Answer:
@Test(expected = ValidationException.class) public void testMinLength() throws ValidationException { longValidationRule.apply(0l); }
@Test(expected = ValidationException.class) public void testMaxLength() throws ValidationException { longValidationRule.apply(10l); }
@Test public void testAllRulesPass() throws ValidationException { longValidationRule.apply(6l); }