@Test
public void testValidateSearchIndexSizeValidationFails()
{

    // Mock the external calls. Please note that we mock index size not to be equal to the business object definition entity list size.
    when(indexFunctionsDao.getNumberOfTypesInIndex(SEARCH_INDEX_NAME)).thenReturn(1L);
    // Index all business object definitions defined in the system.
    boolean response = searchIndexHelperServiceImpl.validateSearchIndexSize(SEARCH_INDEX_NAME, 2);
    // Verify the external calls.
    verify(indexFunctionsDao).getNumberOfTypesInIndex(SEARCH_INDEX_NAME);
    verifyNoMoreInteractions(businessObjectDefinitionDao, businessObjectDefinitionHelper, indexFunctionsDao, searchIndexDaoHelper);
    // Validate the results.
    assertFalse(response);
}