SearchIndexServiceImpl implements SearchIndexService { protected SearchIndexEntity createSearchIndexEntity(SearchIndexCreateRequest request, SearchIndexTypeEntity searchIndexTypeEntity, SearchIndexStatusEntity searchIndexStatusEntity) { SearchIndexEntity searchIndexEntity = new SearchIndexEntity(); searchIndexEntity.setName(setSearchIndexName(request.getSearchIndexType())); searchIndexEntity.setType(searchIndexTypeEntity); searchIndexEntity.setStatus(searchIndexStatusEntity); return searchIndexEntity; }  @Override SearchIndex createSearchIndex(SearchIndexCreateRequest request); @Override SearchIndex deleteSearchIndex(SearchIndexKey searchIndexKey); @Override SearchIndex getSearchIndex(SearchIndexKey searchIndexKey); @Override SearchIndexKeys getSearchIndexes();  }
@Test public void testCreateSearchIndexEntity() { SearchIndexCreateRequest searchIndexCreateRequest = new SearchIndexCreateRequest(SEARCH_INDEX_TYPE); SearchIndexTypeEntity searchIndexTypeEntity = new SearchIndexTypeEntity(); searchIndexTypeEntity.setCode(SEARCH_INDEX_TYPE); SearchIndexStatusEntity searchIndexStatusEntity = new SearchIndexStatusEntity(); searchIndexStatusEntity.setCode(SEARCH_INDEX_STATUS); SearchIndexEntity searchIndexEntity = searchIndexServiceImpl.createSearchIndexEntity(searchIndexCreateRequest, searchIndexTypeEntity, searchIndexStatusEntity); verifyNoMoreInteractions(alternateKeyHelper, businessObjectDefinitionDao, businessObjectDefinitionHelper, configurationDaoHelper, searchIndexDao, searchIndexDaoHelper, searchIndexHelperService, searchIndexStatusDaoHelper, searchIndexTypeDaoHelper); assertNotNull(searchIndexEntity); assertNotNull(searchIndexEntity.getType()); assertEquals(SEARCH_INDEX_TYPE, searchIndexEntity.getType().getCode()); assertNotNull(searchIndexEntity.getStatus()); assertEquals(SEARCH_INDEX_STATUS, searchIndexEntity.getStatus().getCode()); assertNull(searchIndexEntity.getCreatedBy()); assertNull(searchIndexEntity.getCreatedOn()); assertNull(searchIndexEntity.getUpdatedBy()); assertNull(searchIndexEntity.getUpdatedOn()); }