private boolean writeRegisteredServiceToFile(final RegisteredService registeredService, final File file) {
        try (val out = Files.newOutputStream(file.toPath())) {
            return this.registeredServiceSerializers.stream().anyMatch(s -> {
                s.to(out, registeredService);
                return true;
            });
        } catch (final IOException e) {
            throw new IllegalArgumentException("IO error opening file stream.", e);
        }
    }
This is {@link GitServiceRegistry}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-git-service-registry/src/main/java/org/apereo/cas/services/GitServiceRegistry.java