protected void customRequest(SofaRequest request, RpcInternalContext internalContext) {
        RpcInvokeContext context = RpcInvokeContext.getContext();
        Object customCallerApp = context.get(CUSTOM_CALLER_APP);
        if (customCallerApp instanceof String && StringUtils.isNotBlank((String) customCallerApp)) {
            context.remove(CUSTOM_CALLER_APP);
            if (RpcInternalContext.isAttachmentEnable()) {
                internalContext.setAttachment(INTERNAL_KEY_APP_NAME, customCallerApp);
            }
            request.addRequestProp(RemotingConstants.HEAD_APP_NAME, customCallerApp);
        }
    }
@Test
    public void testCustomCtx() {
        RpcInternalContext internalContext = RpcInternalContext.getContext();
        SofaRequest request = getRequest();
        invoker.customRequest(request, internalContext);
        Assert.assertEquals(originCallerApp, request.getRequestProp(RemotingConstants.HEAD_APP_NAME));
        Assert.assertEquals(originCallerApp, internalContext.getAttachment(INTERNAL_KEY_APP_NAME));

        request = getRequest();
        RpcInvokeContext.getContext().put(CUSTOM_CALLER_APP, customCallerApp);
        invoker.customRequest(request, internalContext);
        Assert.assertEquals(customCallerApp, request.getRequestProp(RemotingConstants.HEAD_APP_NAME));
        Assert.assertEquals(customCallerApp, internalContext.getAttachment(INTERNAL_KEY_APP_NAME));

        request = getRequest();
        RpcInvokeContext.getContext().put(CUSTOM_CALLER_APP, new Object());
        invoker.customRequest(request, internalContext);
        Assert.assertEquals(originCallerApp, request.getRequestProp(RemotingConstants.HEAD_APP_NAME));
        Assert.assertEquals(originCallerApp, internalContext.getAttachment(INTERNAL_KEY_APP_NAME));

        request = getRequest();
        RpcInvokeContext.getContext().put(CUSTOM_CALLER_APP, "");
        invoker.customRequest(request, internalContext);
        Assert.assertEquals(originCallerApp, request.getRequestProp(RemotingConstants.HEAD_APP_NAME));
        Assert.assertEquals(originCallerApp, internalContext.getAttachment(INTERNAL_KEY_APP_NAME));

        request = getRequest();
        RpcInvokeContext.getContext().put(CUSTOM_CALLER_APP, null);
        invoker.customRequest(request, internalContext);
        Assert.assertEquals(originCallerApp, request.getRequestProp(RemotingConstants.HEAD_APP_NAME));
        Assert.assertEquals(originCallerApp, internalContext.getAttachment(INTERNAL_KEY_APP_NAME));
    }