private void createServersWithRegions() {
    // Create caches
    Properties props = getDistributedSystemProperties();
    server1.invoke(() -> PRClientServerTestBase.createCacheInVm(props));
    server2.invoke(() -> PRClientServerTestBase.createCacheInVm(props));
    server3.invoke(() -> PRClientServerTestBase.createCacheInVm(props));

    // Create Cache Servers
    Integer port1 = server1.invoke(() -> PRClientServerTestBase.createCacheServer());
    Integer port2 = server2.invoke(() -> PRClientServerTestBase.createCacheServer());
    Integer port3 = server3.invoke(() -> PRClientServerTestBase.createCacheServer());
    serverPort1 = port1;
    serverPort2 = port2;
    serverPort3 = port3;

    // Create client cache without regions
    client.invoke(() -> QueryUsingFunctionContextDUnitTest.createCacheClientWithoutRegion(
        NetworkUtils.getServerHostName(server1.getHost()), port1, port2, port3));

    // Create proxy regions on client.
    client.invoke(QueryUsingFunctionContextDUnitTest::createProxyRegions);

    // Create local Region on servers
    server1.invoke(QueryUsingFunctionContextDUnitTest::createLocalRegion);

    // Create ReplicatedRegion on servers
    server1.invoke(QueryUsingFunctionContextDUnitTest::createReplicatedRegion);
    server2.invoke(QueryUsingFunctionContextDUnitTest::createReplicatedRegion);
    server3.invoke(QueryUsingFunctionContextDUnitTest::createReplicatedRegion);

    // Create two colocated PartitionedRegions On Servers.
    server1.invoke(QueryUsingFunctionContextDUnitTest::createColocatedPR);
    server2.invoke(QueryUsingFunctionContextDUnitTest::createColocatedPR);
    server3.invoke(QueryUsingFunctionContextDUnitTest::createColocatedPR);

  }
Test on PR on one server only using filter.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java