@Test
public void testCreateSearchIndexValidation()
{

    // Create a search index validation create request.
    SearchIndexValidationCreateRequest searchIndexValidationCreateRequest =
        new SearchIndexValidationCreateRequest(new SearchIndexKey(SEARCH_INDEX_NAME), PERFORM_FULL_SEARCH_INDEX_VALIDATION);
    // Create a search index validation response.
    SearchIndexValidation searchIndexValidation =
        new SearchIndexValidation(new SearchIndexKey(SEARCH_INDEX_NAME), SEARCH_INDEX_STATISTICS_CREATION_DATE, false, false, false);
    // Mock the call to the search index validation service.
    when(searchIndexValidationService.createSearchIndexValidation(searchIndexValidationCreateRequest)).thenReturn(searchIndexValidation);
    // Create a search index validation.
    SearchIndexValidation response = searchIndexValidationRestController.createSearchIndexValidation(searchIndexValidationCreateRequest);
    // Verify the calls.
    verify(searchIndexValidationService, times(1)).createSearchIndexValidation(searchIndexValidationCreateRequest);
    response.setValidateStartTime(SEARCH_INDEX_STATISTICS_CREATION_DATE);
    // Validate the returned object.
    assertEquals(searchIndexValidation, response);
}