Add tests for AuthenticationManager injected into security configurer

See gh-1801