@Override
    public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request)
        throws RemotingCommandException {
        switch (request.getCode()) {
            case RequestCode.HEART_BEAT:
                return this.heartBeat(ctx, request);
            case RequestCode.UNREGISTER_CLIENT:
                return this.unregisterClient(ctx, request);
            case RequestCode.CHECK_CLIENT_CONFIG:
                return this.checkClientConfig(ctx, request);
            default:
                break;
        }
        return null;
    }
@Test
    public void processRequest_heartbeat() throws RemotingCommandException {
        RemotingCommand request = createHeartbeatCommand(false, "topicA");
        RemotingCommand response = clientManageProcessor.processRequest(handlerContext, request);
        assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS);
        assertThat(Boolean.parseBoolean(response.getExtFields().get(MixAll.IS_SUB_CHANGE))).isFalse();
        ConsumerGroupInfo consumerGroupInfo = brokerController.getConsumerManager().getConsumerGroupInfo(group);

        RemotingCommand requestSimple = createHeartbeatCommand(true, "topicA");
        RemotingCommand responseSimple = clientManageProcessor.processRequest(handlerContext, requestSimple);
        assertThat(responseSimple.getCode()).isEqualTo(ResponseCode.SUCCESS);
        assertThat(Boolean.parseBoolean(responseSimple.getExtFields().get(MixAll.IS_SUB_CHANGE))).isFalse();
        ConsumerGroupInfo consumerGroupInfoSimple = brokerController.getConsumerManager().getConsumerGroupInfo(group);
        assertThat(consumerGroupInfoSimple).isEqualTo(consumerGroupInfo);

        request = createHeartbeatCommand(false, "topicB");
        response = clientManageProcessor.processRequest(handlerContext, request);
        assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS);
        assertThat(Boolean.parseBoolean(response.getExtFields().get(MixAll.IS_SUB_CHANGE))).isTrue();
        consumerGroupInfo = brokerController.getConsumerManager().getConsumerGroupInfo(group);

        requestSimple = createHeartbeatCommand(true, "topicB");
        responseSimple = clientManageProcessor.processRequest(handlerContext, requestSimple);
        assertThat(responseSimple.getCode()).isEqualTo(ResponseCode.SUCCESS);
        assertThat(Boolean.parseBoolean(responseSimple.getExtFields().get(MixAll.IS_SUB_CHANGE))).isFalse();
        consumerGroupInfoSimple = brokerController.getConsumerManager().getConsumerGroupInfo(group);
        assertThat(consumerGroupInfoSimple).isEqualTo(consumerGroupInfo);
    }