Expand my Community achievements bar.

SOLVED

Null pointer exception for junits

Avatar

Level 3
 
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

there can be many reasons to it below URL will help

https://aemhelper.blogspot.com/2022/03/common-cause-of-nullpionterexception-or.html

Hope this helps

Umesh Thakur

View solution in original post

2 Replies

Avatar

Community Advisor

Hi,

 

Did you mock the details hashmap in test class ? If not it will throw NPE

Avatar

Correct answer by
Community Advisor

there can be many reasons to it below URL will help

https://aemhelper.blogspot.com/2022/03/common-cause-of-nullpionterexception-or.html

Hope this helps

Umesh Thakur