protected static SamlRegisteredService getSamlRegisteredServiceFor(final boolean signAssertion,
                                                                       final boolean signResponses,
                                                                       final boolean encryptAssertions,
                                                                       final String entityId) {
        val service = new SamlRegisteredService();
        service.setName("TestShib");
        service.setServiceId(entityId);
        service.setId(RandomUtils.nextInt());
        service.setSignAssertions(TriStateBoolean.fromBoolean(signAssertion));
        service.setSignResponses(TriStateBoolean.fromBoolean(signResponses));
        service.setEncryptAssertions(encryptAssertions);
        service.setDescription("SAML Service");
        service.setMetadataLocation("classpath:metadata/testshib-providers.xml");
        return service;
    }
This is {@link BaseSamlIdPConfigurationTests}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/BaseSamlIdPConfigurationTests.java