@Test
    void verifyAuthentication() throws Throwable {
        val creds = CoreAuthenticationTestUtils.getCredentialsWithDifferentUsernameAndPassword("u1", "p1");
        val result = authenticationHandler.authenticate(creds, mock(Service.class));
        assertEquals("u1", result.getPrincipal().getId());
        val attributes = result.getPrincipal().getAttributes();
        assertTrue(attributes.containsKey("loc"));
        assertTrue(attributes.containsKey("state"));
    }
Test cases for {@link MongoDbAuthenticationHandler}.

@author Misagh Moayyed
@since 4.2
support/cas-server-support-mongo/src/test/java/org/apereo/cas/authentication/MongoDbAuthenticationHandlerTests.java