protected boolean isYubiKeyRegisteredFor(final String username, final String pubKey) {
        if (StringUtils.isNotBlank(pubKey)) {
            return getYubiKeyAccountRegistry().isYubiKeyRegisteredFor(username, pubKey);
        }
        return getYubiKeyAccountRegistry().isYubiKeyRegisteredFor(username);
    }
This is {@link AbstractYubiKeyAccountRegistryTests}.

@author Timur Duehr
@since 6.0.0
support/cas-server-support-yubikey-core/src/test/java/org/apereo/cas/adaptors/yubikey/AbstractYubiKeyAccountRegistryTests.java