Improved the AuthenticationProvider test.

Also checking now if the userName and the password is correct in the authResult.