### Question:
BooleanPropertyDefinition extends
    PropertyDefinition<Boolean> { @Override public Boolean decodeValue(String value) throws PropertyException { 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 = "testDecodeValueData") public void testDecodeValue(String value, Boolean expected) { BooleanPropertyDefinition d = createPropertyDefinition(); assertEquals(d.decodeValue(value), expected); }
@Test(dataProvider = "testDecodeValueData2", expectedExceptions = {NullPointerException.class,PropertyException.class}) public void testDecodeValue2(String value) { BooleanPropertyDefinition d = createPropertyDefinition(); d.decodeValue(value); }