protected YarnClient createYarnClient() {
    return YarnClient.createYarnClient();
  }
@Test
  public void testGetQueueInfoPreemptionDisabled() throws Exception {
    CapacitySchedulerConfiguration conf = new CapacitySchedulerConfiguration();
    ReservationSystemTestUtil.setupQueueConfiguration(conf);
    conf.setClass(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class,
        ResourceScheduler.class);
    conf.setBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, true);
    conf.set(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES,
        "org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity."
        + "ProportionalCapacityPreemptionPolicy");
    conf.setBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, true);
    conf.setBoolean(PREFIX + "root.a.a1.disable_preemption", true);

    try (MiniYARNCluster cluster =
        new MiniYARNCluster("testReservationAPIs", 2, 1, 1);
         YarnClient yarnClient = YarnClient.createYarnClient()) {
      cluster.init(conf);
      cluster.start();
      final Configuration yarnConf = cluster.getConfig();
      yarnClient.init(yarnConf);
      yarnClient.start();

      QueueCLI cli = createAndGetQueueCLI(yarnClient);
      sysOutStream.reset();
      int result = cli.run(new String[] { "-status", "a1" });
      assertEquals(0, result);
      String queueStatusOut = sysOutStream.toString();
      Assert.assertTrue(queueStatusOut
          .contains("\tPreemption : disabled"));
      Assert.assertTrue(queueStatusOut
          .contains("Intra-queue Preemption : disabled"));
    }
  }