public void setTemplateEntriesForChild(CapacitySchedulerConfiguration conf,
                                         QueuePath childQueuePath) {
    setTemplateEntriesForChild(conf, childQueuePath, false);
  }
@Test
  public void testTemplatePrecedence() {
    conf.set(getTemplateKey(TEST_QUEUE_AB, "capacity"), "6w");
    conf.set(getTemplateKey(TEST_QUEUE_A_WILDCARD, "capacity"), "4w");
    conf.set(getTemplateKey(TEST_QUEUE_TWO_LEVEL_WILDCARDS, "capacity"), "2w");

    AutoCreatedQueueTemplate template =
        new AutoCreatedQueueTemplate(conf, TEST_QUEUE_AB);
    template.setTemplateEntriesForChild(conf, TEST_QUEUE_ABC);

    Assert.assertEquals(
        "explicit template does not have the highest precedence", 6f,
        conf.getNonLabeledQueueWeight(TEST_QUEUE_ABC), 10e-6);

    CapacitySchedulerConfiguration newConf =
        new CapacitySchedulerConfiguration();
    newConf.set(getTemplateKey(TEST_QUEUE_A_WILDCARD, "capacity"), "4w");
    template =
        new AutoCreatedQueueTemplate(newConf, TEST_QUEUE_AB);
    template.setTemplateEntriesForChild(newConf, TEST_QUEUE_ABC);

    Assert.assertEquals("precedence is invalid", 4f,
        newConf.getNonLabeledQueueWeight(TEST_QUEUE_ABC), 10e-6);
  }