### Question:
IntegerPropertyDefinition extends PropertyDefinition<Integer> { @Override public String encodeValue(Integer value) { Reject.ifNull(value); if (allowUnlimited && value < 0) { return UNLIMITED; } return value.toString(); } private  IntegerPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
        EnumSet<PropertyOption> options, AdministratorAction adminAction,
        DefaultBehaviorProvider<Integer> defaultBehavior, int lowerLimit, Integer upperLimit, boolean allowUnlimited); static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName); int getLowerLimit(); Integer getUpperLimit(); LocalizableMessage getUnitSynopsis(); LocalizableMessage getUnitSynopsis(Locale locale); boolean isAllowUnlimited(); @Override void validateValue(Integer value); @Override String encodeValue(Integer value); @Override Integer decodeValue(String value); @Override R accept(PropertyDefinitionVisitor<R, P> v, P p); @Override R accept(PropertyValueVisitor<R, P> v, Integer value, P p); @Override void toString(StringBuilder builder); @Override int compare(Integer o1, Integer o2);  }### Answer:
@Test(dataProvider = "encodeValueData") public void testEncodeValue(Integer value, String expectedValue) { IntegerPropertyDefinition.Builder builder = createTestBuilder(); builder.setAllowUnlimited(true); IntegerPropertyDefinition propertyDef = buildTestDefinition(builder); assertEquals(propertyDef.encodeValue(value), expectedValue); }