### Question:
RootRangeStoreImpl implements RootRangeStore { @Override public CompletableFuture<CreateNamespaceResponse> createNamespace(CreateNamespaceRequest request) { if (log.isTraceEnabled()) { log.trace("Received CreateNamespace request : {}", request); } return CreateNamespaceProcessor.of().process( this, request, executor); } RootRangeStoreImpl(MVCCAsyncStore<byte[], byte[]> store,
                              StorageContainerPlacementPolicy placementPolicy,
                              ScheduledExecutorService executor); @Override CompletableFuture<CreateNamespaceResponse> createNamespace(CreateNamespaceRequest request); @Override CompletableFuture<DeleteNamespaceResponse> deleteNamespace(DeleteNamespaceRequest request); @Override CompletableFuture<GetNamespaceResponse> getNamespace(GetNamespaceRequest request); @Override CompletableFuture<CreateStreamResponse> createStream(CreateStreamRequest request); @Override CompletableFuture<DeleteStreamResponse> deleteStream(DeleteStreamRequest request); @Override CompletableFuture<GetStreamResponse> getStream(GetStreamRequest request);  }### Answer:
@Test public void testCreateNamespaceInvalidName() throws Exception { String nsName = ""; CompletableFuture<CreateNamespaceResponse> createFuture = rootRangeStore.createNamespace( createCreateNamespaceRequest(nsName, namespaceConf)); CreateNamespaceResponse response = FutureUtils.result(createFuture); assertEquals(StatusCode.INVALID_NAMESPACE_NAME, response.getCode()); verifyNamespaceId(-1); }
@Test public void testCreateNamespaceExists() throws Exception { String nsName = name.getMethodName(); CreateNamespaceResponse response = createNamespaceAndVerify(nsName, 0L); verifyNamespaceExists(nsName, response.getNsProps().getNamespaceId()); verifyNamespaceId(0L); CreateNamespaceResponse response2 = FutureUtils.result( rootRangeStore.createNamespace( createCreateNamespaceRequest(nsName, namespaceConf))); assertEquals(StatusCode.INTERNAL_SERVER_ERROR, response2.getCode()); verifyNamespaceId(0L); }