PartitionedRegionQueryEvaluator extends StreamingPartitionOperation { protected ArrayList getAllNodes(RegionAdvisor regionAdvisor) { ArrayList nodes = new ArrayList(regionAdvisor.adviseDataStore()); Collections.shuffle(nodes); return nodes; } PartitionedRegionQueryEvaluator(final InternalDistributedSystem sys,
      final PartitionedRegion pr,
      final DefaultQuery query,
      final ExecutionContext executionContext,
      final Object[] parameters,
      final SelectResults cumulativeResults,
      final Set<Integer> bucketsToQuery); boolean executeQueryOnRemoteAndLocalNodes(final TestHook th); SelectResults queryBuckets(final TestHook th); Map getResultsPerMember();  }
@Test public void testGetAllNodesShouldBeRandomized() { List<Integer> bucketList = createBucketList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); Set bucketSet = new HashSet<>(bucketList); PartitionedRegionQueryEvaluator prqe = new PartitionedRegionQueryEvaluator(system, pr, query, mock(ExecutionContext.class), null, new LinkedResultSet(), bucketSet); RegionAdvisor regionAdvisor = mock(RegionAdvisor.class); when(regionAdvisor.adviseDataStore()).thenReturn(bucketSet); await() .until(() -> !(bucketList.equals(prqe.getAllNodes(regionAdvisor)))); }