class JwtBundleSet implements BundleSource<JwtBundle> {

    public static JwtBundleSet of(@NonNull final Collection<JwtBundle> bundles) {
        if (bundles.size() == 0) {
            throw new IllegalArgumentException("JwtBundle collection is empty");
        }
        final Map<TrustDomain, JwtBundle> bundleMap = new ConcurrentHashMap<>();
        for (JwtBundle bundle : bundles) {
            bundleMap.put(bundle.getTrustDomain(), bundle);
        }
        return new JwtBundleSet(bundleMap);
    }

    private  JwtBundleSet(final Map<TrustDomain, JwtBundle> bundles);
    private  JwtBundleSet();

}