Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Mocking Node object not possible while writing junit when MockitoJUnitRunner framework is used

Avatar

Level 2

I am able to mock resource object by loading dummy.infinity.json file into the classpath. But when i try to instantiate node object through that mock resource object.

Node node = resource.adaptTo(Node.class);

node object comes as null.

0 Replies