expect(request.getQueryPredicate()).andReturn(userPredicate).atLeastOnce();
expect(resource.getQuery()).andReturn(query).atLeastOnce();
query.setUserPredicate(userPredicate);
expect(pm.update(resource, setResourceProperties)).andReturn(status);
expect(status.getStatus()).andReturn(RequestStatus.Status.Accepted);
expect(status.getAssociatedResources()).andReturn(setResources);
expect(resource1.getType()).andReturn(Resource.Type.Cluster).anyTimes();
expect(resource2.getType()).andReturn(Resource.Type.Cluster).anyTimes();
expect(status.getRequestResource()).andReturn(requestResource).anyTimes();