public void setTemplateEntriesForChild(CapacitySchedulerConfiguration conf,
                                         QueuePath childQueuePath) {
    setTemplateEntriesForChild(conf, childQueuePath, false);
  }
@Test
  public void testQueueSpecificTemplates() {
    conf.set(getTemplateKey(ROOT, "capacity"), "2w");
    conf.set(getLeafTemplateKey(ROOT,
        "default-node-label-expression"), "test");
    conf.set(getLeafTemplateKey(ROOT, "capacity"), "10w");
    conf.setBoolean(getParentTemplateKey(
            ROOT, AUTO_CREATE_CHILD_QUEUE_AUTO_REMOVAL_ENABLE), false);

    AutoCreatedQueueTemplate template =
        new AutoCreatedQueueTemplate(conf, ROOT);
    template.setTemplateEntriesForChild(conf, TEST_QUEUE_A);
    template.setTemplateEntriesForChild(conf, TEST_QUEUE_B, true);

    Assert.assertNull("default-node-label-expression is set for parent",
        conf.getDefaultNodeLabelExpression(TEST_QUEUE_A));
    Assert.assertEquals("default-node-label-expression is not set for leaf",
        "test", conf.getDefaultNodeLabelExpression(TEST_QUEUE_B));
    Assert.assertFalse("auto queue removal is not disabled for parent",
        conf.isAutoExpiredDeletionEnabled(TEST_QUEUE_A));
    Assert.assertEquals("weight should not be overridden when set by " +
            "queue type specific template",
        10f, conf.getNonLabeledQueueWeight(TEST_QUEUE_B), 10e-6);
    Assert.assertEquals("weight should be set by common template",
        2f, conf.getNonLabeledQueueWeight(TEST_QUEUE_A), 10e-6);

  }