public UserInfo getUser(String addr, String username, long millis) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQBrokerException {
        GetUserRequestHeader requestHeader = new GetUserRequestHeader(username);
        RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.AUTH_GET_USER, requestHeader);
        RemotingCommand response = this.remotingClient.invokeSync(addr, request, millis);
        assert response != null;
        switch (response.getCode()) {
            case ResponseCode.SUCCESS: {
                return RemotingSerializable.decode(response.getBody(), UserInfo.class);
            }
            default:
                break;
        }
        throw new MQBrokerException(response.getCode(), response.getRemark());
    }
@Test
    public void assertGetUser() throws RemotingException, InterruptedException, MQBrokerException {
        mockInvokeSync();
        setResponseBody(createUserInfo());
        UserInfo actual = mqClientAPI.getUser(defaultBrokerAddr, "", defaultTimeout);
        assertNotNull(actual);
        assertEquals("username", actual.getUsername());
        assertEquals("password", actual.getPassword());
        assertEquals("userStatus", actual.getUserStatus());
        assertEquals("userType", actual.getUserType());
    }