class TrustAnchorsResolverImpl implements TrustAnchorsResolver {

    @Override
    public Set<TrustAnchor> resolve(AAGUID aaguid) {
        AssertUtil.notNull(aaguid, "aaguid must not be null");

        Map<AAGUID, Set<TrustAnchor>> trustAnchors = trustAnchorsProvider.provide();

        HashSet<TrustAnchor> set = new HashSet<>();
        set.addAll(trustAnchors.getOrDefault(AAGUID.NULL, Collections.emptySet()));
        set.addAll(trustAnchors.getOrDefault(aaguid, Collections.emptySet()));
        return set;
    }

    public  TrustAnchorsResolverImpl(TrustAnchorsProvider trustAnchorsProvider);

}