DOIResolver implements PIDResolver { @Override public URI resolve(URI uri) { final String doi = PIDUtils.getSchemeSpecificId(uri.toString()); if (doi == null) { logger.info("DOI not found in URI: {}", uri); return null; } else { return resolveDoi(doi); } } DOIResolver(); @Override URI resolve(URI uri);  }
@Test @Ignore("Depends on live DOI resolver") public void testResolve() { final URI input = URI.create("https: final URI expected = URI.create("https: final URI result = instance.resolve(input); assertEquals("DOI should resolve to expected target", expected, result); }
@Test public void testResolveNonDoi() { final URI input = URI.create("https: final URI result = instance.resolve(input); assertNull("Non-DOI should not resolve", result); }