@Test
public void testValidateAndGetSchedulerConfigurationValidScheduler()
        throws IOException {

  Configuration config = CapacitySchedulerConfigGeneratorForTest
          .createBasicCSConfiguration();
  config.set("yarn.scheduler.capacity.root.test1.state", "STOPPED");
  config.set("yarn.scheduler.capacity.queue-mappings",
          "u:test2:test2");
  ResourceScheduler scheduler = prepareCSForValidation(config);
  SchedConfUpdateInfo mutationInfo = new SchedConfUpdateInfo();
  ArrayList<String> queuesToRemove = new ArrayList();
  queuesToRemove.add("root.test1");
  mutationInfo.setRemoveQueueInfo(queuesToRemove);
  ArrayList<QueueConfigInfo> updateQueueInfo = new ArrayList<>();
  String queueToUpdate = "root.test2";
  Map<String, String> propertiesToUpdate = new HashMap<>();
  propertiesToUpdate.put("capacity", "100");
  updateQueueInfo.add(new QueueConfigInfo(queueToUpdate, propertiesToUpdate));
  mutationInfo.setUpdateQueueInfo(updateQueueInfo);
  RMWebServices webService = prepareWebServiceForValidation(scheduler);
  HttpServletRequest mockHsr = prepareServletRequestForValidation();
  Response response = webService
          .validateAndGetSchedulerConfiguration(mutationInfo, mockHsr);
  Assert.assertEquals(Status.OK
          .getStatusCode(), response.getStatus());
}