@Override
    public void doBeforeRequest(String remoteAddr, RemotingCommand request) {
        if (StringUtils.isNotEmpty(clientConfig.getNamespaceV2())) {
            request.addExtField(MixAll.RPC_REQUEST_HEADER_NAMESPACED_FIELD, "true");
            request.addExtField(MixAll.RPC_REQUEST_HEADER_NAMESPACE_FIELD, clientConfig.getNamespaceV2());
        }
    }
@Test
    public void testDoBeforeRequestWithoutNamespace() {
        clientConfig = new ClientConfig();
        namespaceRpcHook = new NamespaceRpcHook(clientConfig);
        PullMessageRequestHeader pullMessageRequestHeader = new PullMessageRequestHeader();
        RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.PULL_MESSAGE, pullMessageRequestHeader);
        namespaceRpcHook.doBeforeRequest("", request);
        assertThat(request.getExtFields()).isNull();
    }