@Test
    void verifyAction() throws Throwable {
        val repository = mock(AmazonCloudDirectoryRepository.class);
        when(repository.getUser(anyString())).thenReturn(CollectionUtils.wrap("username",
            List.of("casuser"), "password", List.of("Mellon")));
        val h = new AmazonCloudDirectoryAuthenticationHandler(StringUtils.EMPTY, mock(ServicesManager.class),
            PrincipalFactoryUtils.newPrincipalFactory(), repository, casProperties.getAuthn().getCloudDirectory());
        assertNotNull(h.authenticate(CoreAuthenticationTestUtils.getCredentialsWithDifferentUsernameAndPassword("casuser", "Mellon"), mock(Service.class)));
    }
This is {@link AmazonCloudDirectoryAuthenticationHandlerTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-cloud-directory-authentication/src/test/java/org/apereo/cas/authentication/AmazonCloudDirectoryAuthenticationHandlerTests.java