private static void createPartitionedRegion(String regionName) {
    PartitionAttributes<?, ?> partitionAttributes = new PartitionAttributesFactory<>()
        .setRedundantCopies(2)
        .create();

    createRegionFactory(PARTITION)
        .setPartitionAttributes(partitionAttributes)
        .create(regionName);
  }
Override to specify the mechanism used to connect to the Locator.
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/QueryCommandDistributedTestBase.java