### Question:
StringPropertyDefinition extends PropertyDefinition<String> { @Override public String decodeValue(String value) { Reject.ifNull(value); try { validateValue(value); } catch (PropertyException e) { throw PropertyException.illegalPropertyValueException(this, value); } return value; } private  StringPropertyDefinition(AbstractManagedObjectDefinition<?, ?> d, String propertyName,
        EnumSet<PropertyOption> options, AdministratorAction adminAction,
        DefaultBehaviorProvider<String> defaultBehavior, boolean isCaseInsensitive, Pattern pattern,
        String patternUsage); static Builder createBuilder(AbstractManagedObjectDefinition<?, ?> d, String propertyName); @Override R accept(PropertyDefinitionVisitor<R, P> v, P p); @Override R accept(PropertyValueVisitor<R, P> v, String value, P p); @Override String decodeValue(String value); Pattern getPattern(); LocalizableMessage getPatternSynopsis(); LocalizableMessage getPatternSynopsis(Locale locale); String getPatternUsage(); boolean isCaseInsensitive(); @Override String normalizeValue(String value); @Override void validateValue(String value);  }### Answer:
@Test public void testDecodeValuePatternMatches() { StringPropertyDefinition d = getDefinition(true, "^[a-z]+$"); assertEquals(d.decodeValue("abc"), "abc"); }
@Test(enabled = false, expectedExceptions = PropertyException.class) public void testDecodeValuePatternDoesNotMatch() { StringPropertyDefinition d = getDefinition(true, "^[a-z]+$"); d.decodeValue("abc123"); }