@Test
  public void testIndexCreationDeadLockForStatsEnabledRegion() {
    region.destroyRegion();
    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setValueConstraint(Portfolio.class);
    factory.setStatisticsEnabled(true);
    factory.setIndexMaintenanceSynchronous(true);
    region = CacheUtils.createRegion("portfolios", factory.create(), true);
    simulateDeadlockScenario();
    assertFalse(cause, testFailed);
    assertFalse("Index creation failed", exceptionInCreatingIndex);
  }
Tests Index creation and maintenance deadlock scenario for a region with stats enabled
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/IndexCreationDeadLockJUnitTest.java