@Test
    void verifyMalformedJsonFile() throws Throwable {
        val gitDir = new File(FileUtils.getTempDirectory(), GitServiceRegistryProperties.DEFAULT_CAS_SERVICE_REGISTRY_NAME);

        FileUtils.write(Paths.get(gitDir.getAbsolutePath(), "svc-cfg", CasRegisteredService.FRIENDLY_NAME,
            "malformed-1.json").normalize().toFile(), "{\"@class\":\"xxxx\"", StandardCharsets.UTF_8);
        gitRepositoryInstance.commitAll("Malformed json file");

        val svc = buildRegisteredServiceInstance(RandomUtils.nextLong(), CasRegisteredService.class);
        svc.setId(RegisteredServiceDefinition.INITIAL_IDENTIFIER_VALUE);
        newServiceRegistry.save(svc);

        val size = newServiceRegistry.load().size();
        assertEquals(1, size);
    }
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