@Test
public void testCpuPoolSize() {

  // happy path
  Builder builder = InstantiatingGrpcChannelProvider.newBuilder().setProcessorCount(2);
  builder.setChannelsPerCpu(2.5);
  assertEquals(5, builder.getPoolSize());
  // User specified max
  builder = builder.setProcessorCount(50);
  builder.setChannelsPerCpu(100, 10);
  assertEquals(10, builder.getPoolSize());
  // Sane default maximum
  builder.setChannelsPerCpu(200);
  assertEquals(100, builder.getPoolSize());
}