use of com.day.cq.wcm.api.PageManagerFactory in project acs-aem-commons by Adobe-Consulting-Services.
the class PageRelocatorTest method getPageRelocatorTool.
private PageRelocator getPageRelocatorTool() {
PageManagerFactory mockPageManagerFactory = mock(PageManagerFactory.class);
when(mockPageManagerFactory.getPageManager(any())).then(invocation -> new MockPageManager(getMockResolver()));
slingContext.registerService(PageManagerFactory.class, mockPageManagerFactory);
Replicator replicator = mock(Replicator.class);
slingContext.registerService(Replicator.class, replicator);
PageRelocatorFactory t = new PageRelocatorFactory();
slingContext.registerInjectActivateService(t);
return t.createProcessDefinition();
}
Aggregations