iproved unit tests of authentication handlers