@Test void tryGetMalformedURL() { final TrustedCertEntityBuilder builder = new TrustedCertEntityBuilder(new IdGenerator(), null, certFact); assertThrows(EntityBuilderException.class, () -> builder.getUrl("ttps: }
@NotNull @VisibleForTesting URL getUrl(String name) { final URL url; try { url = new URL(name); } catch (MalformedURLException e) { throw new EntityBuilderException("The url specified is malformed: " + e.getMessage(), e); } return url; }
TrustedCertEntityBuilder implements EntityBuilder { @NotNull @VisibleForTesting URL getUrl(String name) { final URL url; try { url = new URL(name); } catch (MalformedURLException e) { throw new EntityBuilderException("The url specified is malformed: " + e.getMessage(), e); } return url; } }
TrustedCertEntityBuilder implements EntityBuilder { @NotNull @VisibleForTesting URL getUrl(String name) { final URL url; try { url = new URL(name); } catch (MalformedURLException e) { throw new EntityBuilderException("The url specified is malformed: " + e.getMessage(), e); } return url; } @Inject  TrustedCertEntityBuilder(IdGenerator idGenerator, SSLSocketFactory acceptAllSocketFactory, CertificateFactory certFactory); }
TrustedCertEntityBuilder implements EntityBuilder { @NotNull @VisibleForTesting URL getUrl(String name) { final URL url; try { url = new URL(name); } catch (MalformedURLException e) { throw new EntityBuilderException("The url specified is malformed: " + e.getMessage(), e); } return url; } @Inject  TrustedCertEntityBuilder(IdGenerator idGenerator, SSLSocketFactory acceptAllSocketFactory, CertificateFactory certFactory); @Override List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder(); }
TrustedCertEntityBuilder implements EntityBuilder { @NotNull @VisibleForTesting URL getUrl(String name) { final URL url; try { url = new URL(name); } catch (MalformedURLException e) { throw new EntityBuilderException("The url specified is malformed: " + e.getMessage(), e); } return url; } @Inject  TrustedCertEntityBuilder(IdGenerator idGenerator, SSLSocketFactory acceptAllSocketFactory, CertificateFactory certFactory); @Override List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder();  }