GRPCClient implements HLAPI { @Override public int getChainHeight() throws HLAPIException { BlockCount height = obs.getBlockCount(com.google.protobuf.Empty.getDefaultInstance()); return (int) height.getCount(); } GRPCClient(String host, int port, int observerPort); @Override String getClientVersion(); @Override String getServerVersion(); @Override long ping(long nonce); @Override void addAlertListener(AlertListener listener); @Override void removeAlertListener(AlertListener listener); @Override int getChainHeight(); @Override HLAPIHeader getBlockHeader(BID hash); @Override HLAPIBlock getBlock(BID hash); @Override HLAPITransaction getTransaction(TID hash); @Override void sendTransaction(Transaction transaction); @Override void registerRejectListener(RejectListener rejectListener); @Override void removeRejectListener(RejectListener rejectListener); @Override void sendBlock(Block block); @Override void registerTransactionListener(TransactionListener listener); @Override void removeTransactionListener(TransactionListener listener); @Override void registerTrunkListener(TrunkListener listener); @Override void removeTrunkListener(TrunkListener listener); @Override void catchUp(List<BID> inventory, int limit, boolean headers, TrunkListener listener);  }
@Test public void testGetBlockHeight() throws HLAPIException { int height = client.getChainHeight(); log.debug("testGetBlockHeight height=" + height); assertTrue(height > 0); }