### Question:
ZkMetadataStoreDirectory implements MetadataStoreDirectory, RoutingDataListener { @Override public Collection<String> getAllShardingKeysInRealm(String namespace, String realm) { if (!_realmToShardingKeysMap.containsKey(namespace)) { throw new NoSuchElementException("Namespace " + namespace + " does not exist!"); } if (!_realmToShardingKeysMap.get(namespace).containsKey(realm)) { throw new NoSuchElementException( "Realm " + realm + " does not exist in namespace " + namespace); } return Collections.unmodifiableCollection(_realmToShardingKeysMap.get(namespace).get(realm)); } @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 = "testGetNamespaceRoutingData") public void testGetAllShardingKeysInRealm() { for (String namespace : _routingZkAddrMap.keySet()) { Assert .assertEquals(_metadataStoreDirectory.getAllShardingKeysInRealm(namespace, TEST_REALM_1), TEST_SHARDING_KEYS_1); Assert .assertEquals(_metadataStoreDirectory.getAllShardingKeysInRealm(namespace, TEST_REALM_2), TEST_SHARDING_KEYS_2); } }