@BeforeAll
    public static void setup() {
        try {
            val gitRepoSampleDir = new File(FileUtils.getTempDirectory(), "cas-sample-data");
            if (gitRepoSampleDir.exists()) {
                FunctionUtils.doAndHandle(
                    __ -> PathUtils.deleteDirectory(gitRepoSampleDir.toPath(), StandardDeleteOption.OVERRIDE_READ_ONLY));
            }
            val gitDir = new File(FileUtils.getTempDirectory(), GitServiceRegistryProperties.DEFAULT_CAS_SERVICE_REGISTRY_NAME);
            if (gitDir.exists()) {
                FunctionUtils.doAndHandle(
                    __ -> PathUtils.deleteDirectory(gitDir.toPath(), StandardDeleteOption.OVERRIDE_READ_ONLY));
            }
            try (val gitSampleRepo = Git.init().setDirectory(gitRepoSampleDir).setBare(false).call()) {
                FileUtils.write(new File(gitRepoSampleDir, "readme.txt"), "text", StandardCharsets.UTF_8);
                gitSampleRepo.add().addFilepattern("*.txt").call();
                gitSampleRepo.commit().setSign(false).setMessage("Initial commit").call();
            }

            try (val git = Git.init().setDirectory(gitDir).setBare(false).call()) {
                FileUtils.write(new File(gitDir, "readme.txt"), "text", StandardCharsets.UTF_8);
                git.add().addFilepattern("*.txt").call();
                git.commit().setSign(false).setMessage("Initial commit").call();
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
            fail(e.getMessage(), e);
        }
    }
This is {@link GitServiceRegistryTests}.

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