ReplaceResourcePropertyValuesRegex extends ReplaceResourcePropertyValues { @Override protected boolean valueMatches(String value) { return searchPattern.matcher(value).find(); } ReplaceResourcePropertyValuesRegex(String searchRegex, String replacement, List<String> propertyNames);   }
@Test public void valueMatches() { ReplaceResourcePropertyValues action = new ReplaceResourcePropertyValuesRegex(OLD_VAL, NEW_VAL, Arrays.asList()); assertTrue(action.valueMatches("oldVal")); assertTrue(action.valueMatches("1oldVal")); assertTrue(action.valueMatches("oldVal1")); assertTrue(action.valueMatches("1oldVal1")); assertFalse(action.valueMatches("1newVal1")); }