@Test void testOf_null_throwsNullPointerException() { try { X509BundleSet.of(null); fail("should have thrown exception"); } catch (NullPointerException e) { assertEquals("bundles is marked non-null but is null", e.getMessage()); } }
public static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles) { if (bundles.size() == 0) { throw new IllegalArgumentException("X509Bundles collection is empty"); } final Map<TrustDomain, X509Bundle> bundleMap = new ConcurrentHashMap<>(); for (X509Bundle bundle : bundles) { bundleMap.put(bundle.getTrustDomain(), bundle); } return new X509BundleSet(bundleMap); }
X509BundleSet implements BundleSource<X509Bundle> { public static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles) { if (bundles.size() == 0) { throw new IllegalArgumentException("X509Bundles collection is empty"); } final Map<TrustDomain, X509Bundle> bundleMap = new ConcurrentHashMap<>(); for (X509Bundle bundle : bundles) { bundleMap.put(bundle.getTrustDomain(), bundle); } return new X509BundleSet(bundleMap); } }
X509BundleSet implements BundleSource<X509Bundle> { public static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles) { if (bundles.size() == 0) { throw new IllegalArgumentException("X509Bundles collection is empty"); } final Map<TrustDomain, X509Bundle> bundleMap = new ConcurrentHashMap<>(); for (X509Bundle bundle : bundles) { bundleMap.put(bundle.getTrustDomain(), bundle); } return new X509BundleSet(bundleMap); } private  X509BundleSet(final Map<TrustDomain, X509Bundle> bundles); private  X509BundleSet(); }
X509BundleSet implements BundleSource<X509Bundle> { public static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles) { if (bundles.size() == 0) { throw new IllegalArgumentException("X509Bundles collection is empty"); } final Map<TrustDomain, X509Bundle> bundleMap = new ConcurrentHashMap<>(); for (X509Bundle bundle : bundles) { bundleMap.put(bundle.getTrustDomain(), bundle); } return new X509BundleSet(bundleMap); } private  X509BundleSet(final Map<TrustDomain, X509Bundle> bundles); private  X509BundleSet(); static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles); static X509BundleSet emptySet(); void put(@NonNull final X509Bundle x509Bundle); @Override X509Bundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain); Map<TrustDomain, X509Bundle> getBundles(); }
X509BundleSet implements BundleSource<X509Bundle> { public static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles) { if (bundles.size() == 0) { throw new IllegalArgumentException("X509Bundles collection is empty"); } final Map<TrustDomain, X509Bundle> bundleMap = new ConcurrentHashMap<>(); for (X509Bundle bundle : bundles) { bundleMap.put(bundle.getTrustDomain(), bundle); } return new X509BundleSet(bundleMap); } private  X509BundleSet(final Map<TrustDomain, X509Bundle> bundles); private  X509BundleSet(); static X509BundleSet of(@NonNull final Collection<X509Bundle> bundles); static X509BundleSet emptySet(); void put(@NonNull final X509Bundle x509Bundle); @Override X509Bundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain); Map<TrustDomain, X509Bundle> getBundles();  }