@Override
    public Set<Resource> getResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

      Set<Resource> resources = new HashSet<>();

      for (int cnt = 0; cnt < 4; ++ cnt) {
        ResourceImpl resource = new ResourceImpl(Resource.Type.Host);

        resource.setProperty(PropertyHelper.getPropertyId("Hosts", "cluster_name"), "cluster");
        resource.setProperty(PropertyHelper.getPropertyId("Hosts", "host_name"), "host:" + (4 - cnt));

        resource.setProperty(PropertyHelper.getPropertyId("Hosts", "cluster_name"), "cluster");
        resource.setProperty(PropertyHelper.getPropertyId("Hosts", "host_name"), "host:" + cnt);

        resource.setProperty(PropertyHelper.getPropertyId("c1", "p1"), cnt);
        resource.setProperty(PropertyHelper.getPropertyId("c1", "p2"), cnt % 2);
        resource.setProperty(PropertyHelper.getPropertyId("c1", "p3"), "foo");
        resource.setProperty(PropertyHelper.getPropertyId("c2", "p4"), "bar");

        if (cnt % 2 == 0) {
          resource.setProperty(PropertyHelper.getPropertyId("alerts_summary", "CRITICAL"), "1");
        } else {
          resource.setProperty(PropertyHelper.getPropertyId("alerts_summary", "WARNING"), "1");
        }

        resources.add(resource);
      }

      return resources;
    }
Tests that when a {@link PageResponse} is present on the
{@link Request}, in-memory paging is not performed.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java