public KVTable getKVListByNamespace(final String namespace, final long timeoutMillis)
        throws RemotingException, MQClientException, InterruptedException {
        GetKVListByNamespaceRequestHeader requestHeader = new GetKVListByNamespaceRequestHeader();
        requestHeader.setNamespace(namespace);

        RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.GET_KVLIST_BY_NAMESPACE, requestHeader);
        RemotingCommand response = this.remotingClient.invokeSync(null, request, timeoutMillis);
        assert response != null;
        switch (response.getCode()) {
            case ResponseCode.SUCCESS: {
                return KVTable.decode(response.getBody(), KVTable.class);
            }
            default:
                break;
        }

        throw new MQClientException(response.getCode(), response.getRemark());
    }
@Test
    public void assertGetKVListByNamespace() throws RemotingException, InterruptedException, MQClientException {
        mockInvokeSync();
        KVTable responseBody = new KVTable();
        responseBody.getTable().put("key", "value");
        setResponseBody(responseBody);
        KVTable actual = mqClientAPI.getKVListByNamespace("", defaultTimeout);
        assertNotNull(actual);
        assertEquals(1, actual.getTable().size());
    }