@Test
public void validateIntegerRange() throws Exception {

    ResourceModel intRes = createResourceModel(Type.INTEGER, "[1-7]");
    assertFalse(intRes.isValid("hi"));
    assertTrue(intRes.isValid(1));
    assertTrue(intRes.isValid("7"));
    assertFalse(intRes.isValid(0));
    assertFalse(intRes.isValid(8));
}