IndexLengthRestrictionEnforcer { public static IndexLengthRestrictionEnforcer newInstance(final String thingId) { checkThingId(thingId); return new IndexLengthRestrictionEnforcer(thingId); } private  IndexLengthRestrictionEnforcer(final String thingId); static IndexLengthRestrictionEnforcer newInstance(final String thingId); Optional<JsonValue> enforce(final JsonPointer pointer, final JsonValue value);  }
@Test(expected = NullPointerException.class) public void newInstanceWithNullThingIdFails() { IndexLengthRestrictionEnforcer.newInstance(null); }
@Test(expected = IllegalArgumentException.class) public void newInstanceWithEmptyThingIdFails() { IndexLengthRestrictionEnforcer.newInstance(""); }