@SuppressWarnings("deprecation")
@Test
public void testDrainTo() {

  Configuration conf = new Configuration();
  conf.setInt("ns." + FairCallQueue.IPC_CALLQUEUE_PRIORITY_LEVELS_KEY, 2);
  FairCallQueue<Schedulable> fcq2 = new FairCallQueue<Schedulable>(2, 10, "ns", conf);
  // Start with 3 in fcq, to be drained
  for (int i = 0; i < 3; i++) {
    fcq.offer(mockCall("c"));
  }
  fcq.drainTo(fcq2);
  assertEquals(0, fcq.size());
  assertEquals(3, fcq2.size());
}