### Question:
DefaultX509Source implements X509Source { @Override public X509Bundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain) throws BundleNotFoundException { if (isClosed()) { throw new IllegalStateException("X.509 bundle source is closed"); } return bundles.getBundleForTrustDomain(trustDomain); } private  DefaultX509Source(final Function<List<X509Svid>, X509Svid> svidPicker, final WorkloadApiClient workloadApiClient); static DefaultX509Source newSource(); static DefaultX509Source newSource(@NonNull final X509SourceOptions options); @Override X509Svid getX509Svid(); @Override X509Bundle getBundleForTrustDomain(@NonNull final TrustDomain trustDomain); @SneakyThrows @Override void close();  }### Answer:
@Test void testGetBundleForTrustDomain() { try { X509Bundle bundle = x509Source.getBundleForTrustDomain(TrustDomain.of("example.org")); assertNotNull(bundle); assertEquals(TrustDomain.of("example.org"), bundle.getTrustDomain()); } catch (BundleNotFoundException e) { fail(e); } }
@Test void testGetBundleForTrustDomain_nullParam() { try { x509Source.getBundleForTrustDomain(null); fail(); } catch (NullPointerException e) { assertEquals("trustDomain is marked non-null but is null", e.getMessage()); } catch (BundleNotFoundException e) { fail(); } }