// replay
replay(managementController, actionManager, hostRoleCommand0, hostRoleCommand1, hostRoleCommand2, hostRoleCommand3,
requestMock0, requestMock1);
ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
type,
PropertyHelper.getPropertyIds(type),
PropertyHelper.getKeyPropertyIds(type),
managementController);
Set<String> propertyIds = new HashSet<String>();
propertyIds.add(RequestResourceProvider.REQUEST_ID_PROPERTY_ID);
propertyIds.add(RequestResourceProvider.REQUEST_STATUS_PROPERTY_ID);
propertyIds.add(RequestResourceProvider.REQUEST_TASK_CNT_ID);
propertyIds.add(RequestResourceProvider.REQUEST_COMPLETED_TASK_CNT_ID);
propertyIds.add(RequestResourceProvider.REQUEST_FAILED_TASK_CNT_ID);
propertyIds.add(RequestResourceProvider.REQUEST_ABORTED_TASK_CNT_ID);
propertyIds.add(RequestResourceProvider.REQUEST_TIMED_OUT_TASK_CNT_ID);
propertyIds.add(RequestResourceProvider.REQUEST_PROGRESS_PERCENT_ID);
Predicate predicate = new PredicateBuilder().property(RequestResourceProvider.REQUEST_ID_PROPERTY_ID).equals("100").or().
property(RequestResourceProvider.REQUEST_ID_PROPERTY_ID).equals("101").toPredicate();
Request request = PropertyHelper.getReadRequest(propertyIds);
Set<Resource> resources = provider.getResources(request, predicate);
Assert.assertEquals(2, resources.size());
for (Resource resource : resources) {
long id = (Long) resource.getPropertyValue(RequestResourceProvider.REQUEST_ID_PROPERTY_ID);
Assert.assertTrue(id == 100L || id == 101L);