@Test
    @SuppressWarnings("JdkObsolete")
    void verifyActionIndexResult() {
        val cloud = mock(CloudDirectoryClient.class);

        val attr1 = AttributeKeyAndValue.builder()
            .key(AttributeKey.builder().name("AttrName1").build())
            .value(TypedAttributeValue.builder().stringValue("AttrValue").build())
            .build();

        val attr2 = AttributeKeyAndValue.builder()
            .key(AttributeKey.builder().name("AttrName2").build())
            .value(TypedAttributeValue.builder().numberValue("123456").build())
            .build();

        val attr3 = AttributeKeyAndValue.builder()
            .key(AttributeKey.builder().name("AttrName3").build())
            .value(TypedAttributeValue.builder().booleanValue(Boolean.TRUE).build())
            .build();

        val attr4 = AttributeKeyAndValue.builder()
            .key(AttributeKey.builder().name("AttrName4").build())
            .value(TypedAttributeValue.builder().datetimeValue(Instant.now(Clock.systemUTC())).build())
            .build();

        val attr5 = AttributeKeyAndValue.builder()
            .key(AttributeKey.builder().name("AttrName5").build())
            .value(TypedAttributeValue.builder()
                .binaryValue(SdkBytes.fromByteBuffer(ByteBuffer.wrap("Testing".getBytes(StandardCharsets.UTF_8)))).build())
            .build();

        val attach = IndexAttachment.builder()
            .indexedAttributes(CollectionUtils.wrapList(attr1, attr2, attr3, attr4, attr5))
            .build();

        val result = ListIndexResponse.builder().indexAttachments(List.of(attach)).build();
        when(cloud.listIndex(any(ListIndexRequest.class))).thenReturn(result);

        val attrResult = ListObjectAttributesResponse.builder().attributes(CollectionUtils.wrapList(attr1, attr2, attr3, attr4, attr5)).build();
        when(cloud.listObjectAttributes(any(ListObjectAttributesRequest.class))).thenReturn(attrResult);
        val r = new DefaultAmazonCloudDirectoryRepository(cloud, new AmazonCloudDirectoryProperties());
        assertFalse(r.getUserInfoFromIndexResult(result).isEmpty());
    }
This is {@link DefaultAmazonCloudDirectoryRepositoryTests}.

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