class AggregatingMetadataStatementsProvider implements MetadataStatementsProvider {

    @SuppressWarnings("Duplicates")
    @Override
    public Map<AAGUID, Set<MetadataStatement>> provide() {
        return metadataStatementsProviders.stream()
                .flatMap(provider -> {
                    try {
                        return provider.provide().entrySet().stream();
                    } catch (RuntimeException e) {
                        logger.warn("Failed to load metadata from one of metadataStatementsProviders", e);
                        return null;
                    }
                })
                .filter(Objects::nonNull)
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
    }

    public  AggregatingMetadataStatementsProvider(List<MetadataStatementsProvider> metadataStatementsProviders);

}