@Test
    void verifyRequiredAttributes() {
        val chain = new ChainingRegisteredServiceAccessStrategy();
        chain.setOperator(LogicalOperatorTypes.AND);
        chain.addStrategy(new DefaultRegisteredServiceAccessStrategy(CollectionUtils.wrap("key1", Set.of("value1"))));
        chain.addStrategy(new DefaultRegisteredServiceAccessStrategy(CollectionUtils.wrap("key2", Set.of("value2"))));
        chain.addStrategy(new DefaultRegisteredServiceAccessStrategy(CollectionUtils.wrap("key1", Set.of("value3"))));
        val attributes = chain.getRequiredAttributes();
        assertEquals(2, attributes.size());
        assertTrue(attributes.containsKey("key1"));
        assertTrue(attributes.containsKey("key2"));
        assertTrue(attributes.get("key1").contains("value1"));
        assertTrue(attributes.get("key1").contains("value3"));
        assertTrue(attributes.get("key2").contains("value2"));
    }
This is {@link ChainingRegisteredServiceAccessStrategyTests}.

@author Misagh Moayyed
@since 6.5.0
core/cas-server-core-services-api/src/test/java/org/apereo/cas/services/ChainingRegisteredServiceAccessStrategyTests.java