### Question:
PatternPropertyConverter extends AbstractPropertyConverter { @Override public Object convert(String value, Context context) { return Pattern.compile(value); }  @Override boolean supports(Class<?> type); @Override Object convert(String value, Context context);  }### Answer:
@Test public void testConvert() throws Exception { String value = "test-\\d+-value"; Pattern pattern = (Pattern) converter.convert(value, null); assertThat(pattern.matcher("test-1234-value").matches(), is(true)); }