@Test
public void testPreprocess_success_hierarchicalAndResourceOnly() throws Exception {
hierarchicalFlushRules.put(Pattern.compile("/content/.*"), new String[] { "/content/hierarchical" });
resourceOnlyFlushRules.put(Pattern.compile("/content/.*"), new String[] { "/content/resource-only" });
final ReplicationAction replicationAction = mock(ReplicationAction.class);
when(replicationAction.getPath()).thenReturn("/content/acs-aem-commons/page");
when(replicationAction.getType()).thenReturn(ReplicationActionType.ACTIVATE);
final ReplicationOptions replicationOptions = new ReplicationOptions();
replicationOptions.setSynchronous(false);
replicationOptions.setFilter(new DispatcherFlushFilter());