@Test
        void verifyMembershipInfoPassed() throws Throwable {
            val syncopeAuthenticationHandler = syncopeAuthenticationHandlers.first();
            try (val webserver = startMockSever(userForMembershipsTypeExtension(), HttpStatus.OK, 8096)) {
                assertDoesNotThrow(() ->
                        syncopeAuthenticationHandler.authenticate(CREDENTIAL, mock(Service.class)));
                val result = syncopeAuthenticationHandler.authenticate(CREDENTIAL, mock(Service.class));
                assertNotNull(result);
                assertFalse(result.getPrincipal().getAttributes().get("syncopeUserMemberships").isEmpty());
                assertEquals(1, result.getPrincipal().getAttributes().get("syncopeUserMemberships").size());
                Map<String, String> membershipAttrs =
                        (Map<String, String>) result.getPrincipal().getAttributes().get("syncopeUserMemberships").get(0);
                assertEquals(3, membershipAttrs.size());
                assertTrue(membershipAttrs.containsKey("groupName"));
                assertTrue(membershipAttrs.containsKey("testSchema1"));
                assertTrue(membershipAttrs.containsKey("testSchema2"));
                assertEquals(membershipAttrs.get("groupName"), "G1");
                assertEquals(membershipAttrs.get("testSchema1"), "[\"valueSchema1\"]");
                assertEquals(membershipAttrs.get("testSchema2"), "[\"valueSchema2\"]");
            }
        }
This is {@link SyncopeAuthenticationHandlerTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-syncope-authentication/src/test/java/org/apereo/cas/syncope/authentication/SyncopeAuthenticationHandlerTests.java