Null pointer exception for junits | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Umesh_Thakur

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

2 replies

Ravi_Pampana
Community Advisor
Community Advisor
March 27, 2023

Hi,

 

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

Umesh_Thakur
Community Advisor
Umesh_ThakurCommunity AdvisorAccepted solution
Community Advisor
March 27, 2023

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