@Test
public void testGetSearchIndexTypeEntity()
{

    // Create and persist database entities required for testing.
    SearchIndexTypeEntity searchIndexTypeEntity = searchIndexTypeDaoTestHelper.createSearchIndexTypeEntity(SEARCH_INDEX_TYPE);
    // Retrieve the search index type entity.
    assertEquals(searchIndexTypeEntity, searchIndexTypeDaoHelper.getSearchIndexTypeEntity(SEARCH_INDEX_TYPE));
    // Test case insensitivity of the search index type code.
    assertEquals(searchIndexTypeEntity, searchIndexTypeDaoHelper.getSearchIndexTypeEntity(SEARCH_INDEX_TYPE.toUpperCase()));
    assertEquals(searchIndexTypeEntity, searchIndexTypeDaoHelper.getSearchIndexTypeEntity(SEARCH_INDEX_TYPE.toLowerCase()));
    // Try to retrieve a non existing search index type.
    try
    {
        searchIndexTypeDaoHelper.getSearchIndexTypeEntity(I_DO_NOT_EXIST);
        fail();
    }
    catch (ObjectNotFoundException e)
    {
        assertEquals(String.format("Search index type with code \"%s\" doesn't exist.", I_DO_NOT_EXIST), e.getMessage());
    }
}