Junit for Optional.map() | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianKasingli
BrianKasingliAccepted solution
New Participant
Feb 15, 2023 7:33 AM UTC

@shaheena_sheikh , very simple, you would need to add mock resources in the AEMContext. In particular you would want to create pages like:

context.pageManager().create("/content/sample/page1", "page1",
        "/apps/sample/templates/homepage", "page1");

And you would want to pass in resolver.resolve("/content/sample/page1");

1 reply

BrianKasingli
BrianKasingliAccepted solution
New Participant
Feb 15, 2023 7:33 AM UTC

@shaheena_sheikh , very simple, you would need to add mock resources in the AEMContext. In particular you would want to create pages like:

context.pageManager().create("/content/sample/page1", "page1",
        "/apps/sample/templates/homepage", "page1");

And you would want to pass in resolver.resolve("/content/sample/page1");

Translate