@Test
public void validateIntegerRange16bit() throws Exception {

    ResourceModel intRes = createResourceModel(Type.INTEGER, "[1-65535]");
    assertFalse(intRes.isValid("hi"));
    assertTrue(intRes.isValid(1));
    assertTrue(intRes.isValid("7"));
    assertFalse(intRes.isValid(0));
    assertTrue(intRes.isValid(new byte[]{0x01, (byte) 0xFF}));
    assertTrue(intRes.isValid("1024"));
    assertTrue(intRes.isValid(new byte[]{(byte) 0xFF, (byte) 0xFF}));
    assertFalse(intRes.isValid(65536));
}