@Test
public void testGetSearchIndexes()
{

    // Create a get search indexes response.
    SearchIndexKeys searchIndexKeys = new SearchIndexKeys(Arrays.asList(new SearchIndexKey(SEARCH_INDEX_NAME), new SearchIndexKey(SEARCH_INDEX_NAME_2)));
    // Mock the call to the search index service.
    when(searchIndexService.getSearchIndexes()).thenReturn(searchIndexKeys);
    // Get search indexes.
    SearchIndexKeys response = searchIndexRestController.getSearchIndexes();
    // Verify the calls.
    verify(searchIndexService, times(1)).getSearchIndexes();
    // Validate the returned object.
    assertEquals(searchIndexKeys, response);
}