I came across with above problem while debugging some junit test cases for sling model.
Exctract:
"Let say your sling model is adaptables to sling Resource and in your test class you are trying to get the instance of your respective Object by adapting request of aemContext. In this case you will end up with NullPointerException."