@Override
  public void convertWeightsForChildQueues(FSQueue queue,
      CapacitySchedulerConfiguration csConfig) {
    List<FSQueue> children = queue.getChildQueues();

    if (queue instanceof FSParentQueue || !children.isEmpty()) {
      QueuePath queuePath = new QueuePath(queue.getName());
      if (queue.getName().equals(ROOT_QUEUE)) {
        csConfig.setNonLabeledQueueWeight(queuePath, queue.getWeight());
      }

      children.forEach(fsQueue -> csConfig.setNonLabeledQueueWeight(
          new QueuePath(fsQueue.getName()), fsQueue.getWeight()));
      csConfig.setAutoQueueCreationV2Enabled(queuePath, true);
    }
  }
@Test
  public void testNoChildQueueConversion() {
    FSQueue root = createFSQueues();
    converter.convertWeightsForChildQueues(root, csConfig);

    assertEquals("root weight", 1.0f,
        csConfig.getNonLabeledQueueWeight(ROOT), 0.0f);
    assertEquals("Converted items", 21,
        csConfig.getPropsWithPrefix(PREFIX).size());
  }