@Test
public void testValidateAndGetSchedulerConfigurationInvalidConfig()
        throws IOException {

  Configuration config = CapacitySchedulerConfigGeneratorForTest
          .createBasicCSConfiguration();
  ResourceScheduler scheduler = prepareCSForValidation(config);
  SchedConfUpdateInfo mutationInfo = new SchedConfUpdateInfo();
  ArrayList<String> queuesToRemove = new ArrayList();
  queuesToRemove.add("root.test1");
  mutationInfo.setRemoveQueueInfo(queuesToRemove);
  RMWebServices webService = prepareWebServiceForValidation(scheduler);
  HttpServletRequest mockHsr = prepareServletRequestForValidation();
  Response response = webService
          .validateAndGetSchedulerConfiguration(mutationInfo, mockHsr);
  Assert.assertEquals(Status.BAD_REQUEST
          .getStatusCode(), response.getStatus());
  Assert.assertTrue(response.getEntity().toString()
          .contains("Illegal capacity of 0.5 for children of queue"));
}