AEM 6.1 | Sightly , JUnit for Class extending WCMuse

Avatar

Avatar

CQ_learner

Avatar

CQ_learner

CQ_learner

20-06-2016

Hi All,

I have a similar issue as described in this link http://stackoverflow.com/questions/31672975/null-pointer-exception-while-creating-junit-testcases-fo... , Any Solution for this?

Thanks in Advance.

View Entire Topic

Avatar

Avatar

CQ_learner

Avatar

CQ_learner

CQ_learner

21-06-2016

Thanks for the Reply. I figured out a way, this worked for me.

@Cascading
WCMUse wcmUse;

wcmUse.getResource().adaptTo(Node.class);

 

or 

@Mocked
WCMUse wcmUse;

wcmUse.getResource();

 

Thanks!