@Test
public void testValidateCSConfigValidQueueDeletion() throws IOException {

  Configuration oldConfig = CapacitySchedulerConfigGeneratorForTest
          .createBasicCSConfiguration();
  oldConfig.set("yarn.scheduler.capacity.root.test2.state", "STOPPED");
  Configuration newConfig = new Configuration(oldConfig);
  newConfig.set("yarn.scheduler.capacity.root.queues", "test1");
  newConfig.set("yarn.scheduler.capacity.root.test1.capacity", "100");
  newConfig.unset("yarn.scheduler.capacity.root.test2.maximum-capacity");
  newConfig.unset("yarn.scheduler.capacity.root.test2.state");
  newConfig.set("yarn.scheduler.capacity.queue-mappings",
          "u:test1:test1");
  RMContext rmContext = prepareRMContext();
  boolean isValidConfig = CapacitySchedulerConfigValidator
            .validateCSConfiguration(oldConfig, newConfig, rmContext);
  Assert.assertTrue(isValidConfig);
}