PMO-2738: fixed nullpointer if test does not mock the application context