public MessageExt viewMessage(String topic, String msgId)
        throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
        MessageId messageId;
        try {
            messageId = MessageDecoder.decodeMessageId(msgId);
        } catch (Exception e) {
            throw new MQClientException(ResponseCode.NO_MESSAGE, "query message by id finished, but no message.");
        }
        return this.mQClientFactory.getMQClientAPIImpl().viewMessage(NetworkUtil.socketAddress2String(messageId.getAddress()),
            topic, messageId.getOffset(), timeoutMillis);
    }
@Test(expected = MQClientException.class)
    public void assertViewMessage() throws MQBrokerException, RemotingException, InterruptedException, MQClientException {
        MessageExt actual = mqAdminImpl.viewMessage(defaultTopic, "1");
        assertNotNull(actual);
    }