public String migrate(String oldJSON, int targetVersion) {
        LOGGER.debug("Migrating to version {}: {}", targetVersion, oldJSON);

        Chainr transform = getTransformerFor(targetVersion);
        Object transformedObject = transform.transform(JsonUtils.jsonToMap(oldJSON), getContextMap(targetVersion));
        String transformedJSON = JsonUtils.toJsonString(transformedObject);


        LOGGER.debug("After migration to version {}: {}", targetVersion, transformedJSON);
        return transformedJSON;
    }
@Test
    void migrateV2ToV3_shouldDoNothingIfJsonDoesNotHaveExternalArtifactConfigs() {
        ConfigRepoDocumentMother documentMother = new ConfigRepoDocumentMother();

        String oldJSON = documentMother.versionTwoComprehensive();
        String newJSON = documentMother.v3Comprehensive();
        String transformedJSON = migrator.migrate(oldJSON, 3);

        assertThatJson(newJSON).isEqualTo(transformedJSON);
    }