@Test
public void testDoAction_match_validDestination() {

    MoveResourceToPathRegex underTest = createObjectUnderTest("/content/(\\w+)/mmm/(\\w+)/(\\w+)", "/content/ooo/$1/$2/i");
    String resourcePath = "/content/en/mmm/sub/resource";
    String targetPath = "/content/ooo/en/sub/i";
    mockWithValues(resourcePath, targetPath, true);
    try {
        String returnString = underTest.doAction(resource);
        assertTrue(returnString.startsWith("Moved"));
        verify(resourceResolver, times(1)).getResource(eq(targetPath));
        verify(resourceResolver, times(1)).move(resourcePath, targetPath);
    } catch (PersistenceException pe) {
        fail();
    }
}