### Question:
SizePropertyDefinition extends PropertyDefinition<Long> { @Override public Long decodeValue(String value) throws PropertyException { ifNull(value); if (allowUnlimited && value.trim().equalsIgnoreCase(UNLIMITED)) { return -1L; } Long i; try { i = SizeUnit.parseValue(value, SizeUnit.BYTES); } catch (NumberFormatException e) { throw PropertyException.illegalPropertyValueException(this, value); } try { validateValue(i); } catch (PropertyException e) { throw PropertyException.illegalPropertyValueException(this, value); } return i; } private  SizePropertyDefinition(
      AbstractManagedObjectDefinition<?, ?> d, String propertyName,
      EnumSet<PropertyOption> options,
      AdministratorAction adminAction,
      DefaultBehaviorProvider<Long> defaultBehavior, Long lowerLimit,
      Long upperLimit, boolean allowUnlimited); static Builder createBuilder(
      AbstractManagedObjectDefinition<?, ?> d, String propertyName); long getLowerLimit(); Long getUpperLimit(); boolean isAllowUnlimited(); @Override void validateValue(Long value); @Override String encodeValue(Long value); @Override Long decodeValue(String value); @Override R accept(PropertyDefinitionVisitor<R, P> v, P p); @Override R accept(PropertyValueVisitor<R, P> v, Long value, P p); @Override void toString(StringBuilder builder); @Override int compare(Long o1, Long o2);  }### Answer:
@Test public void testIsAllowUnlimited1() { SizePropertyDefinition.Builder builder = createTestBuilder(); builder.setAllowUnlimited(true); SizePropertyDefinition spd = buildTestDefinition(builder); spd.decodeValue("unlimited"); }
@Test(expectedExceptions = PropertyException.class) public void testIsAllowUnlimited2() { SizePropertyDefinition.Builder builder = createTestBuilder(); builder.setAllowUnlimited(false); SizePropertyDefinition spd = buildTestDefinition(builder); spd.decodeValue("unlimited"); }