public static HttpBasedServiceCredential getHttpBasedServiceCredentials(final String url) {
        try {
            val service = (CasModelRegisteredService) RegisteredServiceTestUtils.getRegisteredService(url);
            return new HttpBasedServiceCredential(new URI(url).toURL(), service);
        } catch (final Exception e) {
            throw new IllegalArgumentException();
        }
    }
This is {@link RegisteredServiceTestUtils}.

@author Misagh Moayyed
@since 4.2.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/RegisteredServiceTestUtils.java