LoadingState { SubschemaRegistry getSubschemaRegistry(JsonValue rootJson) { return subschemaRegistries.computeIfAbsent(rootJson, SubschemaRegistry::new); } LoadingState(LoaderConfig config,
        Map<String, ReferenceKnot> pointerSchemas,
        Object rootSchemaJson,
        Object schemaJson,
        URI parentScopeId,
        SchemaLocation pointerToCurrentObj);   LoadingState(LoaderConfig config,
            Map<String, ReferenceKnot> pointerSchemas,
            Object rootSchemaJson,
            Object schemaJson,
            URI parentScopeId,
            SchemaLocation pointerToCurrentObj,
            Map<JsonValue, SubschemaRegistry> subschemaRegistries);   }
@Test public void testGetSubschemaRegistry() { JsonValue obj = JsonValue.of(ResourceLoader.DEFAULT.readObj("objecttestcases.json").getJSONObject("nestedIdV6")); Map<JsonValue, SubschemaRegistry> registries = new HashMap<>(); LoadingState ls = new LoadingState(CONFIG, emptyMap(), obj, obj, null, SchemaLocation.empty(), registries); assertTrue(registries.isEmpty()); SubschemaRegistry first = ls.getSubschemaRegistry(obj), second = ls.getSubschemaRegistry(obj); assertNotNull(first); assertSame(first, second); }