ChannelPool extends ManagedChannel { public int size() { return channels.size(); } 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 testEnsureCapcity() throws IOException { MockChannelFactory factory = new MockChannelFactory(); ChannelPool pool = new ChannelPool(factory, 4); Assert.assertEquals(4, factory.channels.size()); Assert.assertEquals(4, pool.size()); }