### Question:
WeEventClient implements IWeEventClient { @Override public TopicInfo state(String topic) throws BrokerException { validateParam(topic); HttpGet httpGet = new HttpGet(String.format("%s/state?topic=%s&groupId=%s", this.brokerRestfulUrl, encodeTopic(topic), this.groupId)); return this.httpClientHelper.invokeCGI(httpGet, new TypeReference<BaseResponse<TopicInfo>>() { }).getData(); } WeEventClient(String brokerUrl, String groupId, String userName, String password, int timeout); @Override boolean unSubscribe(String subscriptionId); @Override boolean open(String topic); @Override boolean close(String topic); @Override boolean exist(String topic); @Override TopicPage list(Integer pageIndex, Integer pageSize); @Override TopicInfo state(String topic); @Override WeEvent getEvent(String eventId); @Override SendResult publish(WeEvent weEvent); @Override CompletableFuture<SendResult> publishAsync(WeEvent weEvent); @Override String subscribe(String topic, String offset, Map<String, String> extension, @NonNull EventListener listener); @Override String subscribe(String[] topics, String offset, Map<String, String> extension, @NonNull EventListener listener); static SSLContext getSSLContext();  }### Answer:
@Test public void testState() throws Exception { TopicInfo topicInfo = this.weEventClient.state(this.topicName); Assert.assertEquals(topicInfo.getTopicName(), this.topicName); }