Added unit test to verify exception thrown if user is null