class JsonFileMetadataStatementsProvider implements MetadataStatementsProvider {

    @Override
    public Map<AAGUID, Set<MetadataStatement>> provide() {
        if (cachedMetadataItems == null) {
            cachedMetadataItems =
                    paths.stream()
                            .map(this::readJsonFile)
                            .distinct()
                            .collect(Collectors.groupingBy(this::extractAAGUID))
                            .entrySet().stream()
                            .collect(Collectors.toMap(Map.Entry::getKey, entry -> new HashSet<>(entry.getValue())));

        }
        return cachedMetadataItems;
    }

    public  JsonFileMetadataStatementsProvider(ObjectConverter objectConverter, List<Path> paths);

}