use of org.apache.bookkeeper.stream.proto.storage.CreateNamespaceRequest in project bookkeeper by apache.
the class StorageContainerImplTest method testCreateNamespace.
//
// Root Range Methods
//
@Test
public void testCreateNamespace() throws Exception {
mockStorageContainer(SCID);
CreateNamespaceResponse expectedResp = CreateNamespaceResponse.getDefaultInstance();
when(rrStore.createNamespace(any(CreateNamespaceRequest.class))).thenReturn(FutureUtils.value(expectedResp));
CreateNamespaceRequest expectedReq = CreateNamespaceRequest.getDefaultInstance();
assertSame(expectedResp, FutureUtils.result(rrStore.createNamespace(expectedReq)));
verify(rrStore, times(1)).createNamespace(same(expectedReq));
}
Aggregations