### Question:
EnumPropertyDefinition extends
    PropertyDefinition<E> { @Override public E decodeValue(String value) throws PropertyException { ifNull(value); String nvalue = value.trim().toLowerCase(); E eValue = decodeMap.get(nvalue); if (eValue == null) { throw PropertyException.illegalPropertyValueException(this, value); } else { return eValue; } } private  EnumPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d,
      String propertyName, EnumSet<PropertyOption> options,
      AdministratorAction adminAction,
      DefaultBehaviorProvider<E> defaultBehavior, Class<E> enumClass); static Builder<E> createBuilder(
      AbstractManagedObjectDefinition<?, ?> d, String propertyName); @Override R accept(PropertyDefinitionVisitor<R, P> v, P p); @Override R accept(PropertyValueVisitor<R, P> v, E value, P p); @Override E decodeValue(String value); Class<E> getEnumClass(); final LocalizableMessage getValueSynopsis(E value); final LocalizableMessage getValueSynopsis(Locale locale, E value); @Override String normalizeValue(E value); @Override void validateValue(E value);  }### Answer:
@Test(dataProvider = "decodeValueData") public void testDecodeValue(String value, TestEnum expectedValue) { EnumPropertyDefinition epd = builder.getInstance(); assertEquals(epd.decodeValue(value), expectedValue); }
@Test(dataProvider = "decodeValueData2", expectedExceptions = {NullPointerException.class, PropertyException.class} ) public void testDecodeValue2(String value) { EnumPropertyDefinition epd = builder.getInstance(); epd.decodeValue(value); }