public synchronized Schema create(URI id, String refFragmentPathDelimiters) {

        URI normalizedId = id.normalize();

        if (!schemas.containsKey(normalizedId)) {

            URI baseId = removeFragment(id).normalize();
            if (!schemas.containsKey(baseId)) {
                logger.debug("Reading schema: " + baseId);
                final JsonNode baseContent = contentResolver.resolve(baseId);
                schemas.put(baseId, new Schema(baseId, baseContent, null));
            }

            final Schema baseSchema = schemas.get(baseId);
            if (normalizedId.toString().contains("#")) {
                JsonNode childContent = fragmentResolver.resolve(baseSchema.getContent(), '#' + id.getFragment(), refFragmentPathDelimiters);
                schemas.put(normalizedId, new Schema(normalizedId, childContent, baseSchema));
            }
        }

        return schemas.get(normalizedId);
    }
@Test
    public void createWithEmbeddedSelfRef() throws URISyntaxException {

        URI schemaUri = getClass().getResource("/schema/embeddedRef.json").toURI();

        SchemaStore schemaStore = new SchemaStore();
        Schema topSchema = schemaStore.create(schemaUri, "#/.");
        Schema embeddedSchema = schemaStore.create(topSchema, "#/definitions/embedded", "#/.");
        Schema selfRefSchema = schemaStore.create(embeddedSchema, "#", "#/.");

        assertThat(topSchema, is(sameInstance(selfRefSchema)));

    }