@Test
public void testEmptyChildQueues() {

  FairSchedulerConfiguration fsConf = new FairSchedulerConfiguration();
  RMContext rmContext = mock(RMContext.class);
  PlacementManager placementManager = new PlacementManager();
  SystemClock clock = SystemClock.getInstance();
  FairScheduler scheduler = mock(FairScheduler.class);
  when(scheduler.getConf()).thenReturn(fsConf);
  when(scheduler.getConfig()).thenReturn(fsConf);
  when(scheduler.getRMContext()).thenReturn(rmContext);
  when(rmContext.getQueuePlacementManager()).thenReturn(placementManager);
  when(scheduler.getClusterResource()).thenReturn(
      Resource.newInstance(1, 1));
  when(scheduler.getResourceCalculator()).thenReturn(
      new DefaultResourceCalculator());
  when(scheduler.getClock()).thenReturn(clock);
  AllocationConfiguration allocConf = new AllocationConfiguration(scheduler);
  when(scheduler.getAllocationConfiguration()).thenReturn(allocConf);
  QueueManager queueManager = new QueueManager(scheduler);
  queueManager.initialize();
  FSQueue testQueue = queueManager.getLeafQueue("test", true);
  FairSchedulerQueueInfo queueInfo =
      new FairSchedulerQueueInfo(testQueue, scheduler);
  Collection<FairSchedulerQueueInfo> childQueues =
      queueInfo.getChildQueues();
  Assert.assertNotNull(childQueues);
  Assert.assertEquals("Child QueueInfo was not empty", 0, childQueues.size());
}