@Test
public void testValidateAndGetSchedulerConfigurationInvalidScheduler()
        throws AuthorizationException {

  ResourceScheduler scheduler = new CapacityScheduler();
  RMWebServices webService = prepareWebServiceForValidation(scheduler);
  SchedConfUpdateInfo mutationInfo = new SchedConfUpdateInfo();
  HttpServletRequest mockHsr = prepareServletRequestForValidation();
  Response response = webService
          .validateAndGetSchedulerConfiguration(mutationInfo, mockHsr);
  Assert.assertEquals(Status.BAD_REQUEST
          .getStatusCode(), response.getStatus());
  Assert.assertTrue(response.getEntity().toString()
          .contains("Configuration change validation only supported by"
                  +" MutableConfScheduler."));
}