### Question:
BooleanPropertyDefinition extends PropertyDefinition<Boolean> { @Override public Boolean decodeValue(String value) { Reject.ifNull(value); String nvalue = value.trim().toLowerCase(); Boolean b = VALUE_MAP.get(nvalue); if (b == null) { throw PropertyException.illegalPropertyValueException(this, value); } else { return b; } } private  BooleanPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
        EnumSet<PropertyOption> options, AdministratorAction adminAction,
        DefaultBehaviorProvider<Boolean> defaultBehavior); static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName); @Override void validateValue(Boolean value); @Override Boolean decodeValue(String value); @Override R accept(PropertyDefinitionVisitor<R, P> v, P p); @Override R accept(PropertyValueVisitor<R, P> v, Boolean value, P p); @Override int compare(Boolean o1, Boolean o2);  }### Answer:
@Test(dataProvider = "decodeValueData") public void testDecodeValue(String value, Boolean expected) { BooleanPropertyDefinition def = createPropertyDefinition(); assertEquals(def.decodeValue(value), expected); }
@Test(dataProvider = "decodeValueDataIllegal", expectedExceptions = { NullPointerException.class, PropertyException.class }) public void testDecodeValueIllegal(String value) { BooleanPropertyDefinition def = createPropertyDefinition(); def.decodeValue(value); }