### Question:
AdminClient implements NsrAdmin { @Override public String publish(TopicAdmin.PublishArg pubSubArg) throws Exception{ pubSubArg.host=host; try { String result= topicAdmin.publish(pubSubArg, null); hostProvider.onConnected(); return result; }catch (Exception e){ onException(); logger.info("request exception",e); throw e; } } AdminClient(String connectionStr); @Override String publish(TopicAdmin.PublishArg pubSubArg); @Override String subscribe(TopicAdmin.SubscribeArg pubSubArg); @Override String unPublish(TopicAdmin.PublishArg pubSubArg); @Override String unSubscribe(TopicAdmin.SubscribeArg pubSubArg); @Override String delTopic(TopicAdmin.TopicArg topicArg); @Override String createTopic(TopicAdmin.TopicArg topicArg); @Override String token(AppAdmin.TokenArg tokenArg); @Override List<AppToken> tokens(AppAdmin.TokensArg tokensArg); @Override List<Broker> listBroker(BrokerAdmin.ListArg listArg); @Override String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg); void onException(); @Override void close();  }### Answer:
@Test public void publish() throws Exception{ TopicAdmin.PublishArg pubSubArg=new TopicAdmin.PublishArg(); pubSubArg.subscribe.topic=topic; pubSubArg.subscribe.app=app; pubSubArg.subscribe.type=(int) Subscription.Type.PRODUCTION.getValue(); String result=client.publish(pubSubArg); Assert.assertEquals("success",result); result=client.unPublish(pubSubArg); Assert.assertEquals("success",result); }