@Test
  public void testQueriesWithFilterKeysOnPRLocalAndRemote() {

    client.invoke(new CacheSerializableRunnable("Test query on client and server") {

      @Override
      public void run2() throws CacheException {
        Set filter = getFilter(0, 1);

        TestServerQueryFunction func = new TestServerQueryFunction("LDS Server function-1");
        function = new TestQueryFunction("queryFunction-2");

        for (final String query : queries) {
          Object[][] r = new Object[1][2];

          QueryUsingFunctionContextDUnitTest test = new QueryUsingFunctionContextDUnitTest();
          ArrayList queryResults2 =
              test.runQueryOnClientUsingFunc(function, PartitionedRegionName1, filter, query);
          if (queryResults2 == null) {
            fail(query + "result is null from client function");
          }
          ArrayList queryResults1 = test.runLDSQueryOnClientUsingFunc(func, filter, query);
          if (queryResults1 == null) {
            fail(query + "result is null from LDS function");
          }

          r[0][0] = queryResults1;
          r[0][1] = queryResults2;
          StructSetOrResultsSet ssORrs = new StructSetOrResultsSet();
          ssORrs.CompareQueryResultsAsListWithoutAndWithIndexes(r, 1, false,
              new String[] {query});
        }
      }
    });
  }
Test on PR on one server only using filter.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java