### Question:
MqResource implements IMqResource { public GetMessageCountResponse getMessageCount(GetMessageCountRequest request) { if (request == null) { return null; } String url = MqConstanst.CONSUMERPRE + "/getMessageCount"; return post(request, url, 2, GetMessageCountResponse.class, true); } MqResource(String url, long connectionTimeOut, long readTimeOut);  MqResource(IHttpClient httpClient, String url); void setUrls(List<String> urlsTempG1, List<String> urlsTempG2); long register(ConsumerRegisterRequest request); void publishAndUpdateResultFailMsg(FailMsgPublishAndUpdateResultRequest request); void deRegister(ConsumerDeRegisterRequest request); GetMetaGroupResponse getMetaGroup(GetMetaGroupRequest request); GetTopicResponse getTopic(GetTopicRequest request); GetGroupTopicResponse getGroupTopic(GetGroupTopicRequest request); void addCat(CatRequest request); boolean publish(PublishMessageRequest request); boolean publish(PublishMessageRequest request, int retryTimes); void commitOffset(CommitOffsetRequest request); ConsumerGroupRegisterResponse registerConsumerGroup(ConsumerGroupRegisterRequest request); void heartbeat(HeartbeatRequest request); GetConsumerGroupResponse getConsumerGroup(GetConsumerGroupRequest request); GetMessageCountResponse getMessageCount(GetMessageCountRequest request); PullDataResponse pullData(PullDataRequest request); GetTopicQueueIdsResponse getTopicQueueIds(GetTopicQueueIdsRequest request); void addLog(LogRequest request); void addOpLog(OpLogRequest request); void sendMail(SendMailRequest request); @Override String getBrokerIp();  }### Answer:
@Test public void getMessageCountNullTest() { IHttpClient httpClient = mock(IHttpClient.class); MqResource mqResource = new MqResource(httpClient, "http: assertEquals("getMessageCountNullTest error", null, mqResource.getMessageCount(null)); }