@Test
    void checkNoPublicKeyDefined() {
        val service = RegisteredServiceTestUtils.getService("testDefault");
        val encoder = new DefaultCasProtocolAttributeEncoder(this.servicesManager,
            RegisteredServicePublicKeyCipherExecutor.INSTANCE,
            CipherExecutor.noOpOfStringToString());
        val encoded = encoder.encodeAttributes(Map.of(), this.attributes, servicesManager.findServiceBy(service), service);
        assertEquals(this.attributes.size() - 2, encoded.size());
    }
This is test cases for {@link DefaultCasProtocolAttributeEncoder}.

@author Misagh Moayyed
@since 4.1
support/cas-server-support-person-directory/src/test/java/org/apereo/cas/DefaultCasAttributeEncoderTests.java