### Question:
FederatedZKLogMetadataStore extends NamespaceWatcher implements LogMetadataStore, Watcher, Runnable, FutureEventListener<Set<URI>> { @Override public CompletableFuture<Iterator<String>> getLogs(String logNamePrefix) { if (!"".equals(logNamePrefix)) { return FutureUtils.exception( new UnexpectedException("Get logs by prefix is not supported by federated metadata store")); } if (duplicatedLogFound.get()) { return duplicatedLogException(duplicatedLogName.get()); } return postStateCheck(retrieveLogs().thenApply( resultList -> getIterator(resultList))); } FederatedZKLogMetadataStore(
            DistributedLogConfiguration conf,
            URI namespace,
            ZooKeeperClient zkc,
            OrderedScheduler scheduler); static void createFederatedNamespace(URI namespace, ZooKeeperClient zkc); @Override void run(); @Override void onSuccess(Set<URI> uris); @Override void onFailure(Throwable cause); @Override void process(WatchedEvent watchedEvent); @Override CompletableFuture<URI> createLog(final String logName); @Override CompletableFuture<Optional<URI>> getLogLocation(final String logName); @Override CompletableFuture<Iterator<String>> getLogs(String logNamePrefix); @Override void registerNamespaceListener(NamespaceListener listener);  }### Answer:
@Test(timeout = 60000) public void testGetLogs() throws Exception { int numLogs = 3 * maxLogsPerSubnamespace; Set<String> expectedLogs = createLogs(numLogs, "test-get-logs"); Set<String> receivedLogs; do { TimeUnit.MILLISECONDS.sleep(20); receivedLogs = new TreeSet<String>(); Iterator<String> logs = Utils.ioResult(metadataStore.getLogs("")); receivedLogs.addAll(Lists.newArrayList(logs)); } while (receivedLogs.size() < numLogs); assertEquals(numLogs, receivedLogs.size()); assertTrue(Sets.difference(expectedLogs, receivedLogs).isEmpty()); }