@Test
public void testSitePreemptionConversion() {

  yarnConfig.setBoolean(FairSchedulerConfiguration.PREEMPTION, true);
  yarnConfig.setInt(FairSchedulerConfiguration.WAIT_TIME_BEFORE_KILL, 123);
  yarnConfig.setInt(
      FairSchedulerConfiguration.WAIT_TIME_BEFORE_NEXT_STARVATION_CHECK_MS,
        321);
  converter.convertSiteProperties(yarnConfig, yarnConvertedConfig, false,
    false);
  assertTrue("Preemption enabled",
      yarnConvertedConfig.getBoolean(
          YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS,
          false));
  assertEquals("Wait time before kill", 123,
      yarnConvertedConfig.getInt(
          CapacitySchedulerConfiguration.PREEMPTION_WAIT_TIME_BEFORE_KILL,
            -1));
  assertEquals("Starvation check wait time", 321,
      yarnConvertedConfig.getInt(
          CapacitySchedulerConfiguration.PREEMPTION_MONITORING_INTERVAL,
            -1));
}