@Override
  public int remainingCapacity() {
    int sum = 0;
    for (BlockingQueue<E> q : this.queues) {
      sum += q.remainingCapacity();
    }
    return sum;
  }
@Test
  public void testTotalCapacityOfSubQueues() {
    Configuration conf = new Configuration();
    FairCallQueue<Schedulable> fairCallQueue;
    fairCallQueue = new FairCallQueue<Schedulable>(1, 1000, "ns", conf);
    assertThat(fairCallQueue.remainingCapacity()).isEqualTo(1000);
    fairCallQueue = new FairCallQueue<Schedulable>(4, 1000, "ns", conf);
    assertThat(fairCallQueue.remainingCapacity()).isEqualTo(1000);
    fairCallQueue = new FairCallQueue<Schedulable>(7, 1000, "ns", conf);
    assertThat(fairCallQueue.remainingCapacity()).isEqualTo(1000);
    fairCallQueue = new FairCallQueue<Schedulable>(1, 1025, "ns", conf);
    assertThat(fairCallQueue.remainingCapacity()).isEqualTo(1025);
    fairCallQueue = new FairCallQueue<Schedulable>(4, 1025, "ns", conf);
    assertThat(fairCallQueue.remainingCapacity()).isEqualTo(1025);
    fairCallQueue = new FairCallQueue<Schedulable>(7, 1025, "ns", conf);
    assertThat(fairCallQueue.remainingCapacity()).isEqualTo(1025);
    fairCallQueue = new FairCallQueue<Schedulable>(7, 1025, "ns",
        new int[]{7, 6, 5, 4, 3, 2, 1}, false, conf);
    assertThat(fairCallQueue.remainingCapacity()).isEqualTo(1025);
  }