### Question:
ZkMetadataStoreDirectory implements MetadataStoreDirectory, RoutingDataListener { @Override public Collection<String> getAllShardingKeys(String namespace) { if (!_realmToShardingKeysMap.containsKey(namespace)) { throw new NoSuchElementException("Namespace " + namespace + " does not exist!"); } Set<String> allShardingKeys = new HashSet<>(); _realmToShardingKeysMap.get(namespace).values().forEach(allShardingKeys::addAll); return allShardingKeys; } @VisibleForTesting protected  ZkMetadataStoreDirectory(); static ZkMetadataStoreDirectory getInstance(); static ZkMetadataStoreDirectory getInstance(String namespace, String zkAddress); @Override Collection<String> getAllNamespaces(); @Override Collection<String> getAllMetadataStoreRealms(String namespace); @Override Collection<String> getAllShardingKeys(String namespace); @Override Map<String, List<String>> getNamespaceRoutingData(String namespace); @Override boolean setNamespaceRoutingData(String namespace, Map<String, List<String>> routingData); @Override Collection<String> getAllShardingKeysInRealm(String namespace, String realm); @Override Map<String, String> getAllMappingUnderPath(String namespace, String path); @Override String getMetadataStoreRealm(String namespace, String shardingKey); @Override boolean addMetadataStoreRealm(String namespace, String realm); @Override boolean deleteMetadataStoreRealm(String namespace, String realm); @Override boolean addShardingKey(String namespace, String realm, String shardingKey); @Override boolean deleteShardingKey(String namespace, String realm, String shardingKey); @Override void refreshRoutingData(String namespace); @Override synchronized void close(); static void createRoutingDataPath(HelixZkClient zkClient, String zkAddress);  }### Answer:
@Test(dependsOnMethods = "testGetAllMetadataStoreRealms") public void testGetAllShardingKeys() { Set<String> allShardingKeys = new HashSet<>(); allShardingKeys.addAll(TEST_SHARDING_KEYS_1); allShardingKeys.addAll(TEST_SHARDING_KEYS_2); for (String namespace : _routingZkAddrMap.keySet()) { Assert.assertEquals(_metadataStoreDirectory.getAllShardingKeys(namespace), allShardingKeys); } }