### Question:
ApiClient implements ICategoryProvider<W>, IMetadataProvider { @Override public Metadata requestMetadata(final IWiki wiki) throws ApiException { Map<String, String> params = new HashMap<>(); params.put("meta", "siteinfo"); params.put("siprop", "general|namespaces|namespacealiases"); JsonObject json = this.request(wiki.getApiUrl(), params); String articlepath; String server; final Map<Integer, String> authoritativeNamespaces = new HashMap<>(); final Map<String, Integer> allNamespacesInverse = new HashMap<>(); try { JsonObject query = json.getJsonObject("query"); articlepath = query.getJsonObject("general").getString("articlepath"); server = query.getJsonObject("general").getString("server"); JsonObject namespaces = query.getJsonObject("namespaces"); for (String nsIdString : namespaces.keySet()) { JsonObject namespaceData = namespaces.getJsonObject(nsIdString); int nsId = Integer.parseInt(nsIdString); String nsName = namespaceData.getString("*"); authoritativeNamespaces.put(nsId, nsName); allNamespacesInverse.put(nsName, nsId); if (namespaceData.containsKey("canonical")) { String nsCanonical = namespaceData.getString("canonical"); if (nsCanonical != null && !nsCanonical.isEmpty()) { allNamespacesInverse.put(nsCanonical, nsId); } } } JsonArray namespacealiases = query.getJsonArray("namespacealiases"); for (int i = 0; i < namespacealiases.size(); i++) { JsonObject namespacealiasData = namespacealiases.getJsonObject(i); int nsId = namespacealiasData.getInt("id"); String nsName = namespacealiasData.getString("*"); if (nsName != null && !nsName.isEmpty()) { allNamespacesInverse.put(nsName, nsId); } } } catch (JsonException e) { throw new ApiException(Messages.getString("ApiClient.Exception.ParsingJSON"), e); } return new Metadata(articlepath, server, authoritativeNamespaces, allNamespacesInverse); } ApiClient(); @Override Map<String, Collection<String>> requestCategories(W wiki, List<String> fullTitles, boolean showhidden); @Override List<String> requestCategorymembers(final W wiki, final String fullTitle); Collection<Pair<String, String>> requestLinksBetween(W wiki, List<String> fullTitles); @Override Metadata requestMetadata(final IWiki wiki);  }### Answer:
@Test public void testRequestMetadata() throws ApiException { Metadata result = client.requestMetadata(wiki); assertNotNull(result); }