Revert "change tests because of npe when mocking exceptions"

This reverts commit 05b088dd07ef57a06cd22d0f43f77b3b3203d043.