public static ComponentResourceProvider getComponentResourceProvider(AmbariManagementController managementController)
          throws AmbariException {
    Resource.Type type = Resource.Type.Component;
    MaintenanceStateHelper maintenanceStateHelper = createNiceMock(MaintenanceStateHelper.class);
    expect(maintenanceStateHelper.isOperationAllowed(anyObject(Resource.Type.class),
            anyObject(Service.class))).andReturn(true).anyTimes();
    expect(maintenanceStateHelper.isOperationAllowed(anyObject(Resource.Type.class),
            anyObject(ServiceComponentHost.class))).andReturn(true).anyTimes();
    replay(maintenanceStateHelper);

    return new ComponentResourceProvider(managementController, maintenanceStateHelper);
  }
Ensure that ServiceComponentNotFoundException is handled where there are multiple requests as would be the
case when an OR predicate is provided in the query.
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java