GrpcClientImpl implements GrpcClient, Closeable { @Override public void close() { try { if (null != this.channel) { this.channel.shutdown().awaitTermination(3, TimeUnit.SECONDS); } } catch (Throwable e) { logger.debug("Fail to close grpc client by {}", e.toString()); throw new HerajException(e); } } GrpcClientImpl(); AergoRPCServiceBlockingStub getBlockingStub(); AergoRPCServiceFutureStub getFutureStub(); AergoRPCServiceStub getStreamStub(); @Override void close(); @Override String toString();  }
@Test public void testClose() { final GrpcClientImpl grpcClient = new GrpcClientImpl(); grpcClient.close(); }