@Test
public void testQueueOrderingPolicy() throws Exception {

  converter = builder.build();
  String absolutePath =
      new File("src/test/resources/fair-scheduler-orderingpolicy.xml")
        .getAbsolutePath();
  yarnConfig.set(FairSchedulerConfiguration.ALLOCATION_FILE,
      FILE_PREFIX + absolutePath);
  fs.close();
  fs = createFairScheduler();
  rootQueue = fs.getQueueManager().getRootQueue();
  converter.convertQueueHierarchy(rootQueue);
  // root
  assertEquals("root ordering policy", null,
      csConfig.get(PREFIX + "root.ordering-policy"));
  assertEquals("root.default ordering policy", "fair",
      csConfig.get(PREFIX + "root.default.ordering-policy"));
  assertEquals("root.admins ordering policy", null,
      csConfig.get(PREFIX + "root.admins.ordering-policy"));
  assertEquals("root.users ordering policy", null,
      csConfig.get(PREFIX + "root.users.ordering-policy"));
  // root.users
  assertEquals("root.users.joe ordering policy", "fair",
      csConfig.get(PREFIX + "root.users.joe.ordering-policy"));
  assertEquals("root.users.john ordering policy", "fifo",
      csConfig.get(PREFIX + "root.users.john.ordering-policy"));
  // root.admins
  assertEquals("root.admins.alice ordering policy", "fifo",
      csConfig.get(PREFIX + "root.admins.alice.ordering-policy"));
  assertEquals("root.admins.bob ordering policy", "fair",
      csConfig.get(PREFIX + "root.admins.bob.ordering-policy"));
}