LocalDiscoveryProvider extends AbstractDiscoveryProvider { @Override public RestDescription getRestDocument(String root, String name, String version) throws NotFoundException { ensureDiscoveryResult(); RestDescription doc = discoveryDocs.get(new ApiKey(name, version, null )); if (doc == null) { throw new NotFoundException("Not Found"); } return replaceRoot(doc, root); } LocalDiscoveryProvider(ImmutableList<ApiConfig> apiConfigs, DiscoveryGenerator generator,
      SchemaRepository repository); @Override RestDescription getRestDocument(String root, String name, String version); @Override RpcDescription getRpcDocument(String root, String name, String version); @Override DirectoryList getDirectory(String root);  }
@Test public void getRestDocument() throws Exception { RestDescription doc = provider.getRestDocument(ROOT, NAME, VERSION); assertThat(doc.getBaseUrl()).isEqualTo("https: assertThat(doc.getRootUrl()).isEqualTo("https: }
@Test public void getRestDocument_NotFoundException() { try { provider.getRestDocument(ROOT, NAME, "notfound"); fail("expected NotFoundException"); } catch (NotFoundException expected) { } }