Adapt resource to Page int unit test
Hi everyone, I am having problems to test Pages in my unit tests. I have the following code:
Resource resource = context.load().json(PAGE_PATH + JSON_EXT, PAGE_PATH);
Page page = resource.adaptTo(Page.class);
The answer of adapTo is always null.
I am working with SlingMocks, and this is my resource
public final SlingContext context = new SlingContext();
There is a option to do this? I know its possible with wcm.io but I don't want to include that just for this kind of tests.
Thanks in advance.
