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