@Test()
  public void waitUntilFlushThrowsIllegalStateExceptionWhenAEQNotFound() throws Exception {
    Map<String, Analyzer> fields = new HashMap<>();
    fields.put("name", null);
    fields.put("lastName", null);
    fields.put("address", null);
    region = createRegionAndIndex(fields);

    // This is to send IllegalStateException from WaitUntilFlushedFunction
    String nonCreatedIndex = "index2";
    boolean result = false;
    try {
      result = luceneService.waitUntilFlushed(nonCreatedIndex, REGION_NAME, 60000,
          TimeUnit.MILLISECONDS);
      fail(
          "Should have got the exception because the queue does not exist for the non created index ");
    } catch (Exception ex) {
      assertEquals(ex.getMessage(),
          "java.lang.IllegalStateException: The AEQ does not exist for the index index2 region "
              + SEPARATOR + "index");
      assertFalse(result);
    }
  }
This class contains tests of lucene queries that can fit
geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/LuceneQueriesIntegrationTest.java