class MetadataStatementsTrustAnchorsProvider implements TrustAnchorsProvider {

    @Override
    public Map<AAGUID, Set<TrustAnchor>> provide() {
        return metadataStatementsProvider.provide().entrySet().stream()
                .collect(Collectors.toMap(
                        Map.Entry::getKey,
                        entry -> entry.getValue().stream().flatMap(metadataStatement ->
                                metadataStatement.getAttestationRootCertificates().stream()
                                        .map(certificate -> new TrustAnchor(certificate, null))
                        ).collect(Collectors.toSet())
                ));
    }

    public  MetadataStatementsTrustAnchorsProvider(MetadataStatementsProvider metadataStatementsProvider);

}