@Test()
  public void creatingDuplicateLuceneIndexFails()
      throws IOException, ParseException, InterruptedException, LuceneQueryException {
    Region region = createRegion();
    LuceneService luceneService = LuceneServiceProvider.get(cache);
    final LuceneIndexFactoryImpl indexFactory =
        (LuceneIndexFactoryImpl) luceneService.createIndexFactory();
    indexFactory.setFields("field1", "field2").create(INDEX_NAME, REGION_NAME, true);

    LuceneIndex index = luceneService.getIndex(INDEX_NAME, REGION_NAME);
    assertNotNull(index);

    expectedException.expect(LuceneIndexExistsException.class);
    indexFactory.setFields("field1", "field2").create(INDEX_NAME, REGION_NAME, true);
  }
Tests of creating lucene indexes on regions. All tests of index creation use cases should be in
classes starting with LuceneIndexCreation*. Most tests belong in this class, except for:
<ul>
<li>Tests that use persistence are in {@link LuceneIndexCreationPersistenceIntegrationTest}</li>
<li>Tests that use offheap are in {@link LuceneIndexCreationOffHeapIntegrationTest}</li>
</ul>
geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/LuceneIndexCreationIntegrationTest.java