### Question:
StorageClientImpl extends AbstractAutoAsyncCloseable implements StorageClient { @Override public CompletableFuture<PTable<ByteBuf, ByteBuf>> openPTable(String tableName) { return openPTable(defaultNamespace, tableName); } StorageClientImpl(String namespaceName,
                      StorageClientSettings settings,
                      ClientResources resources);  StorageClientImpl(String namespaceName,
                             StorageClientSettings settings,
                             ClientResources resources,
                             StorageServerClientManager serverManager,
                             boolean ownServerManager); @Override CompletableFuture<PTable<ByteBuf, ByteBuf>> openPTable(String tableName); @Override CompletableFuture<PTable<ByteBuf, ByteBuf>> openPTable(String namespaceName,
                                                                  String tableName); @Override CompletableFuture<Table<ByteBuf, ByteBuf>> openTable(String table); @Override CompletableFuture<Table<ByteBuf, ByteBuf>> openTable(String namespaceName,
                                                                String table); @Override void close();  }### Answer:
@SuppressWarnings("unchecked") @Test public void testOpenPTable() throws Exception { StreamProperties streamProps = StreamProperties.newBuilder(STREAM_PROPERTIES) .setStreamConf(StreamConfiguration.newBuilder(DEFAULT_STREAM_CONF) .setStorageType(StorageType.TABLE) .build()) .build(); when(client.getStreamProperties(anyString(), anyString())) .thenReturn(FutureUtils.value(streamProps)); PByteBufTableImpl tableImpl = mock(PByteBufTableImpl.class); when(tableImpl.initialize()).thenReturn(FutureUtils.value(tableImpl)); PowerMockito.whenNew(PByteBufTableImpl.class) .withAnyArguments() .thenReturn(tableImpl); PTable<ByteBuf, ByteBuf> returnedTableImpl = FutureUtils.result( client.openPTable(STREAM_NAME) ); assertSame(tableImpl, returnedTableImpl); }