@Test
  public void testSearchIndexWithKeysOnly() throws Exception {
    final ResultCollector mockResultCollector = mock(ResultCollector.class, "ResultCollector");
    final LuceneSearchIndexCommand command =
        spy(new LuceneTestSearchIndexCommand(mockCache, null));

    final List<Set<LuceneSearchResults>> queryResultsList = new ArrayList<>();
    HashSet<LuceneSearchResults> queryResults = new HashSet<>();
    queryResults.add(createQueryResults("A", "Result1", Float.parseFloat("1.3")));
    queryResults.add(createQueryResults("B", "Result1", Float.parseFloat("1.2")));
    queryResults.add(createQueryResults("C", "Result1", Float.parseFloat("1.1")));
    queryResultsList.add(queryResults);
    doReturn(mockResultCollector).when(command).executeSearch(any(LuceneQueryInfo.class));
    doReturn(queryResultsList).when(mockResultCollector).getResult();

    ResultModel result = command.searchIndex("index", "region", "Result1", "field1", -1, true);
    TabularResultModel data = result.getTableSection("lucene-indexes");
    assertThat(data.getValuesInColumn("key")).isEqualTo(Arrays.asList("A", "B", "C"));
  }
The LuceneIndexCommandsJUnitTest class is a test suite of test cases testing the contract and
functionality of the Lucene Index Commands.

@see LuceneCreateIndexCommand
@see LuceneDescribeIndexCommand
@see LuceneDestroyIndexCommand
@see LuceneListIndexCommand
@see LuceneSearchIndexCommand
geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/cli/commands/LuceneIndexCommandsJUnitTest.java