I'm writing a Junit test case for a resourceType servlet. A configuration is referenced like below in the servlet.
And during runtime, we are checking the below condition -
if(!pagePath.contains(config.getProjectContentPath())) where pagePath is one of the query params.
Now, in the unit test for this, I'm using AemContext and have registered the configuration like -
SessionMgmtConfigService config = new SessionMgmtConfigImpl();
aemContext.registerService(SessionMgmtConfigService.class, config);
servlet.config = config;
But, I'm getting a NPE while trying to debug this test case on the .contains line.
How can I get the values for the config params?