private RemotingCommand getUser(ChannelHandlerContext ctx,
        RemotingCommand request) throws RemotingCommandException {
        final RemotingCommand response = RemotingCommand.createResponseCommand(null);

        GetUserRequestHeader requestHeader = request.decodeCommandCustomHeader(GetUserRequestHeader.class);

        if (StringUtils.isBlank(requestHeader.getUsername())) {
            response.setCode(ResponseCode.SYSTEM_ERROR);
            response.setRemark("The username is blank");
            return response;
        }

        this.brokerController.getAuthenticationMetadataManager().getUser(requestHeader.getUsername())
            .thenAccept(user -> {
                response.setCode(ResponseCode.SUCCESS);
                if (user != null) {
                    UserInfo userInfo = UserConverter.convertUser(user);
                    response.setBody(JSON.toJSONString(userInfo).getBytes(StandardCharsets.UTF_8));
                }
            })
            .exceptionally(ex -> {
                LOGGER.error("get user {} error", requestHeader.getUsername(), ex);
                return handleAuthException(response, ex);
            })
            .join();

        return response;
    }
@Test
    public void testGetUser() throws RemotingCommandException {
        when(authenticationMetadataManager.getUser(eq("abc"))).thenReturn(CompletableFuture.completedFuture(User.of("abc", "123", UserType.NORMAL)));

        GetUserRequestHeader getUserRequestHeader = new GetUserRequestHeader();
        getUserRequestHeader.setUsername("abc");
        RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.AUTH_GET_USER, getUserRequestHeader);
        request.setVersion(441);
        request.addExtField("AccessKey", "rocketmq");
        request.makeCustomHeaderToNet();
        RemotingCommand response = adminBrokerProcessor.processRequest(handlerContext, request);
        assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS);
        UserInfo userInfo = JSON.parseObject(new String(response.getBody()), UserInfo.class);
        assertThat(userInfo.getUsername()).isEqualTo("abc");
        assertThat(userInfo.getPassword()).isEqualTo("123");
        assertThat(userInfo.getUserType()).isEqualTo("Normal");
    }