private WSFederationRegisteredService getWsFederationRegisteredService() {
        val realm = casProperties.getAuthn().getWsfedIdp().getIdp().getRealm();
        val registeredService = new WSFederationRegisteredService();
        registeredService.setRealm(realm);
        registeredService.setServiceId("http://app.example.org/wsfed-idp");
        registeredService.setName(UUID.randomUUID().toString());
        registeredService.setId(RandomUtils.nextLong());
        registeredService.setPolicyNamespace("policy-namespace");
        registeredService.setAppliesTo(realm);
        servicesManager.save(registeredService);
        return registeredService;
    }
This is {@link SecurityTokenServiceClientBuilderTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-ws-idp/src/test/java/org/apereo/cas/authentication/SecurityTokenServiceClientBuilderTests.java