public static PersonAttributeDao newStubAttributeRepository(final StubPrincipalAttributesProperties stub) {
        val dao = new StubPersonAttributeDao();
        val backingMap = new LinkedHashMap<String, List<Object>>();
        stub.getAttributes().forEach((key, value) -> {
            val vals = StringUtils.commaDelimitedListToStringArray(value);
            backingMap.put(key, Arrays.stream(vals)
                .map(v -> {
                    val result = BooleanUtils.toBooleanObject(v);
                    if (result != null) {
                        return result;
                    }
                    return v;
                })
                .collect(Collectors.toList()));
        });
        dao.setBackingMap(backingMap);
        dao.setOrder(stub.getOrder());
        dao.setEnabled(stub.getState() != AttributeRepositoryStates.DISABLED);
        dao.putTag("state", stub.getState());
        if (StringUtils.hasText(stub.getId())) {
            dao.setId(stub.getId());
        }
        return dao;
    }
New stub attribute repository.

@param stub the stub
@return the person attribute dao
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/PersonAttributeUtils.java