### Question:
AdminClient implements NsrAdmin { @Override public String subscribe(TopicAdmin.SubscribeArg pubSubArg) throws Exception{ pubSubArg.host=host; try { String result= topicAdmin.subscribe(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 subscribe() throws Exception{ TopicAdmin.SubscribeArg pubSubArg=new TopicAdmin.SubscribeArg(); pubSubArg.subscribe.topic=topic; pubSubArg.subscribe.app=app; pubSubArg.subscribe.type=(int)Subscription.Type.CONSUMPTION.getValue(); String result=client.subscribe(pubSubArg); Assert.assertEquals("success",result); result=client.unSubscribe(pubSubArg); Assert.assertEquals("success",result); }