### Question:
ClusterControllerImpl implements ClusterController { @Override public QueryResponse getResources(Type type, Request request, Predicate predicate) throws UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException, SystemException { QueryResponse queryResponse = null; ExtendedResourceProviderWrapper provider = ensureResourceProviderWrapper(type); ensurePropertyProviders(type); if (provider != null) { if (LOG.isDebugEnabled()) { LOG.debug("Using resource provider {} for request type {}", provider.getClass().getName(), type); } checkProperties(type, request, predicate); queryResponse = provider.queryForResources(request, predicate); } return queryResponse == null ? new QueryResponseImpl(Collections.emptySet()) : queryResponse; } ClusterControllerImpl(ProviderModule providerModule); @Override Predicate getAmendedPredicate(Type type, Predicate predicate); @Override QueryResponse getResources(Type type, Request request, Predicate predicate); @Override Set<Resource> populateResources(Type type,
                                         Set<Resource> resources,
                                         Request request,
                                         Predicate predicate); @Override Iterable<Resource> getIterable(Type type, QueryResponse queryResponse,
                                        Request request, Predicate predicate,
                                        PageRequest pageRequest,
                                        SortRequest sortRequest); @Override PageResponse getPage(Type type, QueryResponse queryResponse,
                              Request request, Predicate predicate,
                              PageRequest pageRequest, SortRequest sortRequest); @Override Schema getSchema(Type type); @Override RequestStatus createResources(Type type, Request request); @Override RequestStatus updateResources(Type type, Request request, Predicate predicate); @Override RequestStatus deleteResources(Type type, Request request, Predicate predicate); @Override ResourceProvider ensureResourceProvider(Type type);  }### Answer:
@Test public void testGetResources() throws Exception{ ClusterControllerImpl controller = new ClusterControllerImpl(new TestProviderModule()); Set<String> propertyIds = new HashSet<>(); propertyIds.add(PropertyHelper.getPropertyId("c1", "p1")); propertyIds.add(PropertyHelper.getPropertyId("c1", "p3")); Request request = PropertyHelper.getReadRequest(propertyIds); Iterable<Resource> iterable = controller.getResourceIterable(Resource.Type.Host, request, null); int cnt = 0; for (Resource resource : iterable) { Assert.assertEquals(Resource.Type.Host, resource.getType()); ++cnt; } Assert.assertEquals(4, cnt); }