### Question:
RootRangeClientImplWithRetries implements RootRangeClient { @Override public CompletableFuture<NamespaceProperties> getNamespace(String namespace) { return runRpcWithRetries(() -> client.getNamespace(namespace)); } RootRangeClientImplWithRetries(RootRangeClient client,
                                   Backoff.Policy backoffPolicy,
                                   OrderedScheduler scheduler); @Override CompletableFuture<NamespaceProperties> createNamespace(String namespace,
                                                                  NamespaceConfiguration nsConf); @Override CompletableFuture<Boolean> deleteNamespace(String namespace); @Override CompletableFuture<NamespaceProperties> getNamespace(String namespace); @Override CompletableFuture<StreamProperties> createStream(String nsName,
                                                            String streamName,
                                                            StreamConfiguration streamConf); @Override CompletableFuture<Boolean> deleteStream(String nsName, String streamName); @Override CompletableFuture<StreamProperties> getStream(String nsName, String streamName); @Override CompletableFuture<StreamProperties> getStream(long streamId);  }### Answer:
@Test public void testGetNamespace() throws Exception { when(client.getNamespace(anyString())) .thenAnswer(invocationOnMock -> { if (callCounter.decrementAndGet() > 0) { return FutureUtils.exception(new StatusRuntimeException(Status.NOT_FOUND)); } else { return FutureUtils.value(NS_PROPS); } }); assertSame(NS_PROPS, FutureUtils.result(clientWithRetries.getNamespace(NS_NAME))); }