I created a Sling Model class for my component to get the root page and access all the child pages of that root page. Then how to do a unit testing for my sling model by using Junit5 and AEM Mocks.
A developer is creating a custom component on the page and needs to list all the child pages of the root page. How to do that and what is the correct way to do that?