HandleClientUriResolverImpl implements UriResolver { @Override public String resolve(String uri) { final String handle = getHandle(uri); if (handle == null) { return uri; } else { logger.debug("Calling handle client to resolve handle [{}]", uri); final String resolved = handleClient.getUrl(handle); if (resolved == null) { return uri; } else { return resolved; } } } HandleClientUriResolverImpl(HandleClient handleClient); @Override boolean canResolve(String uri); @Override String resolve(String uri);  }
@Test public void testResolveNonHandle() { String result = instance.resolve("http: assertEquals("http: }
@Test public void testResolveHandleScheme() { context.checking(new Expectations() { { oneOf(handleClient).getUrl("1234/5678"); will(returnValue("http: } }); String result = instance.resolve("hdl:1234/5678"); assertEquals("http: }
@Test public void testResolveHandleProxy() { context.checking(new Expectations() { { oneOf(handleClient).getUrl("1234/5678"); will(returnValue("http: } }); String result = instance.resolve("http: assertEquals("http: }