ChannelPool extends ManagedChannel { @Override public synchronized ManagedChannel shutdown() { for (ManagedChannel channelWrapper : channels) { channelWrapper.shutdown(); } this.shutdown = true; return this; } ChannelPool(ChannelFactory factory, int count); @InternalApi("For internal usage only") static final String extractIdentifier(Metadata trailers); @Override String authority(); @Override ClientCall<ReqT, RespT> newCall(
      MethodDescriptor<ReqT, RespT> methodDescriptor, CallOptions callOptions); int size(); @Override synchronized ManagedChannel shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override ManagedChannel shutdownNow(); @Override boolean awaitTermination(long timeout, TimeUnit unit);  }
@Test public void testShutdown() throws IOException { MockChannelFactory factory = new MockChannelFactory(); new ChannelPool(factory, 1).shutdown(); for (ManagedChannel managedChannel : factory.channels) { verify(managedChannel, times(1)).shutdown(); } }