@Test
public void testChannelsAreRoundRobinned() throws IOException {

  MockChannelFactory factory = new MockChannelFactory();
  MethodDescriptor descriptor = BigtableGrpc.getMutateRowMethod();
  ChannelPool pool = new ChannelPool(factory, 2);
  pool.newCall(descriptor, CallOptions.DEFAULT);
  verify(factory.channels.get(0), times(1)).newCall(same(descriptor), same(CallOptions.DEFAULT));
  verify(factory.channels.get(1), times(0)).newCall(same(descriptor), same(CallOptions.DEFAULT));
  pool.newCall(descriptor, CallOptions.DEFAULT);
  verify(factory.channels.get(0), times(1)).newCall(same(descriptor), same(CallOptions.DEFAULT));
  verify(factory.channels.get(1), times(1)).newCall(same(descriptor), same(CallOptions.DEFAULT));
}