@Test
  public void testQueryEvictedDataNotDeserializable() {
    addIgnoredException(InvalidClassException.class);

    server1.invoke(() -> createReplicatedRegionWithEviction(REGION_EVICTION_NAME));
    locator.waitUntilRegionIsReadyOnExactlyThisManyServers(REGION_EVICTION_NAME_PATH, 1);
    server1.invoke(() -> setUpNotDeserializableDataForRegion(REGION_EVICTION_NAME_PATH));

    String query = "query --query=\"" +
        "select Value from " + REGION_EVICTION_NAME_PATH + "\" --interactive=false";

    gfsh.executeAndAssertThat(query).statusIsError()
        .containsOutput("An IOException was thrown while deserializing");

  }
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