@Test
    void testNullAttribNames() {
        val attributeSources = new ArrayList<PersonAttributeDao>();

        attributeSources.add(sourceOne);
        attributeSources.add(sourceTwo);
        attributeSources.add(collidesWithOne);

        var impl = new MergingPersonAttributeDaoImpl();
        impl.setPersonAttributeDaos(attributeSources);

        var attribNames = impl.getPossibleUserAttributeNames(PersonAttributeDaoFilter.alwaysChoose());

        val expectedAttribNames = new HashSet<String>();
        expectedAttribNames.addAll(sourceOne.getPossibleUserAttributeNames(PersonAttributeDaoFilter.alwaysChoose()));
        expectedAttribNames.addAll(sourceTwo.getPossibleUserAttributeNames(PersonAttributeDaoFilter.alwaysChoose()));
        expectedAttribNames.addAll(collidesWithOne.getPossibleUserAttributeNames(PersonAttributeDaoFilter.alwaysChoose()));

        assertEquals(expectedAttribNames, attribNames);

        var attributes = impl.getAvailableQueryAttributes(PersonAttributeDaoFilter.alwaysChoose());
        assertTrue(attributes.isEmpty());

        val failingDao = mock(PersonAttributeDao.class);
        when(failingDao.getAvailableQueryAttributes(any()))
            .thenThrow(new UnauthorizedAuthenticationException("Failed"));
        val impl2 = new MergingPersonAttributeDaoImpl();
        impl2.setPersonAttributeDaos(List.of(failingDao));
        impl2.setRecoverExceptions(false);

        assertThrows(UnauthorizedAuthenticationException.class,
            () -> impl2.getAvailableQueryAttributes(PersonAttributeDaoFilter.alwaysChoose()));
    }
Testcase for {@link StubPersonAttributeDao}.

@author Misagh Moayyed
@since 7.1.0
core/cas-server-core-authentication-api/src/test/java/org/apereo/cas/authentication/attribute/MergingPersonAttributeDaoImplTests.java