@Test void testOf_null_throwsNullPointerException() { try { JwtBundleSet.of(null); fail("should have thrown exception"); } catch (NullPointerException e) { assertEquals("bundles is marked non-null but is null", e.getMessage()); } }
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); }
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); } }
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(); }
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(); static JwtBundleSet of(@NonNull final Collection<JwtBundle> bundles); static JwtBundleSet emptySet(); @Override JwtBundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain); Map<TrustDomain, JwtBundle> getBundles(); void put(@NonNull final JwtBundle jwtBundle); }
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(); static JwtBundleSet of(@NonNull final Collection<JwtBundle> bundles); static JwtBundleSet emptySet(); @Override JwtBundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain); Map<TrustDomain, JwtBundle> getBundles(); void put(@NonNull final JwtBundle jwtBundle);  }