private void helpTestAsyncMaintenance() throws Exception {
    boolean expected = false;
    try {
      index = qs.createHashIndex("idHash", "p.ID", SEPARATOR + "portfolios_async p");
    } catch (UnsupportedOperationException e) {
      expected = true;
    } catch (IndexInvalidException e) {
      // for partition region exception;
      expected = true;
    }

    assertTrue(expected);
  }
test async exception for hash index using partitioned region
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java