GenericAcmeProvider extends AbstractAcmeProvider { @Override public URL resolve(URI serverUri) { try { return new URL(serverUri.getScheme(), serverUri.getHost(), serverUri.getPort(), serverUri.getPath()); } catch (MalformedURLException ex) { throw new IllegalArgumentException("Bad generic server URI", ex); } }  @Override boolean accepts(URI serverUri); @Override URL resolve(URI serverUri);  }
@Test public void testResolve() throws URISyntaxException { URI serverUri = new URI("http: GenericAcmeProvider provider = new GenericAcmeProvider(); URL resolvedUrl = provider.resolve(serverUri); assertThat(resolvedUrl.toString(), is(equalTo(serverUri.toString()))); Connection connection = provider.connect(serverUri); assertThat(connection, is(instanceOf(DefaultConnection.class))); }