test_class.declarator: businessObjectDefinitionDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDefinitionDao businessObjectDefinitionDao;
test_class.type: BusinessObjectDefinitionDao
test_class.var_name: businessObjectDefinitionDao
test_class.declarator: businessObjectDefinitionHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDefinitionHelper businessObjectDefinitionHelper;
test_class.type: BusinessObjectDefinitionHelper
test_class.var_name: businessObjectDefinitionHelper
test_class.declarator: searchIndexDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SearchIndexDaoHelper searchIndexDaoHelper;
test_class.type: SearchIndexDaoHelper
test_class.var_name: searchIndexDaoHelper
test_class.declarator: searchIndexHelperServiceImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private SearchIndexHelperServiceImpl searchIndexHelperServiceImpl;
test_class.type: SearchIndexHelperServiceImpl
test_class.var_name: searchIndexHelperServiceImpl
test_class.declarator: indexFunctionsDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private IndexFunctionsDao indexFunctionsDao;
test_class.type: IndexFunctionsDao
test_class.var_name: indexFunctionsDao
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/SearchIndexHelperServiceImplTest.java
test_class.identifier: SearchIndexHelperServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testValidateSearchIndexSizeValidationPasses()
      {
          // Mock the external calls. Please note that we mock index size to be equal to the business object definition entity list size.
          when(indexFunctionsDao.getNumberOfTypesInIndex(SEARCH_INDEX_NAME)).thenReturn(2L);
  
  
          // 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.
          assertTrue(response);
      }
test_case.class_method_signature: SearchIndexHelperServiceImplTest.testValidateSearchIndexSizeValidationPasses()
test_case.full_signature: @Test public void testValidateSearchIndexSizeValidationPasses()
test_case.identifier: testValidateSearchIndexSizeValidationPasses
test_case.invocations: thenReturn when getNumberOfTypesInIndex validateSearchIndexSize getNumberOfTypesInIndex verify verifyNoMoreInteractions assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidateSearchIndexSizeValidationPasses()
focal_class.declarator: BUSINESS_OBJECT_DEFINITIONS_CHUNK_SIZE = 100
focal_class.modifier: public static final
focal_class.original_string: public static final int BUSINESS_OBJECT_DEFINITIONS_CHUNK_SIZE = 100;
focal_class.type: int
focal_class.var_name: BUSINESS_OBJECT_DEFINITIONS_CHUNK_SIZE
focal_class.declarator: LOGGER = LoggerFactory.getLogger(SearchIndexHelperServiceImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(SearchIndexHelperServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: businessObjectDefinitionDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDefinitionDao businessObjectDefinitionDao;
focal_class.type: BusinessObjectDefinitionDao
focal_class.var_name: businessObjectDefinitionDao
focal_class.declarator: businessObjectDefinitionHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDefinitionHelper businessObjectDefinitionHelper;
focal_class.type: BusinessObjectDefinitionHelper
focal_class.var_name: businessObjectDefinitionHelper
focal_class.declarator: searchIndexDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SearchIndexDaoHelper searchIndexDaoHelper;
focal_class.type: SearchIndexDaoHelper
focal_class.var_name: searchIndexDaoHelper
focal_class.declarator: tagDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private TagDao tagDao;
focal_class.type: TagDao
focal_class.var_name: tagDao
focal_class.declarator: tagHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private TagHelper tagHelper;
focal_class.type: TagHelper
focal_class.var_name: tagHelper
focal_class.declarator: indexFunctionsDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private IndexFunctionsDao indexFunctionsDao;
focal_class.type: IndexFunctionsDao
focal_class.var_name: indexFunctionsDao
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/SearchIndexHelperServiceImpl.java
focal_class.identifier: SearchIndexHelperServiceImpl
focal_class.interfaces: implements SearchIndexHelperService
focal_class.class_method_signature: SearchIndexHelperServiceImpl.indexAllBusinessObjectDefinitions(SearchIndexKey searchIndexKey)
focal_class.full_signature: @Override @Async public Future<Void> indexAllBusinessObjectDefinitions(SearchIndexKey searchIndexKey)
focal_class.identifier: indexAllBusinessObjectDefinitions
focal_class.modifiers: @Override @Async public
focal_class.parameters: (SearchIndexKey searchIndexKey)
focal_class.return: Future<Void>
focal_class.signature: Future<Void> indexAllBusinessObjectDefinitions(SearchIndexKey searchIndexKey)
focal_class.class_method_signature: SearchIndexHelperServiceImpl.indexAllTags(SearchIndexKey searchIndexKey)
focal_class.full_signature: @Override @Async public Future<Void> indexAllTags(SearchIndexKey searchIndexKey)
focal_class.identifier: indexAllTags
focal_class.modifiers: @Override @Async public
focal_class.parameters: (SearchIndexKey searchIndexKey)
focal_class.return: Future<Void>
focal_class.signature: Future<Void> indexAllTags(SearchIndexKey searchIndexKey)
focal_class.class_method_signature: SearchIndexHelperServiceImpl.validateSearchIndexSize(String indexName, int expectedIndexSize)
focal_class.full_signature: protected boolean validateSearchIndexSize(String indexName, int expectedIndexSize)
focal_class.identifier: validateSearchIndexSize
focal_class.modifiers: protected
focal_class.parameters: (String indexName, int expectedIndexSize)
focal_class.return: boolean
focal_class.signature: boolean validateSearchIndexSize(String indexName, int expectedIndexSize)
focal_method.body: protected boolean validateSearchIndexSize(String indexName, int expectedIndexSize)
      {
          final long indexSize = indexFunctionsDao.getNumberOfTypesInIndex(indexName);
  
          boolean result = true;
          if (indexSize != expectedIndexSize)
          {
              LOGGER.error("Index validation failed, expected index size {}, does not equal actual index size {}.", expectedIndexSize, indexSize);
              result = false;
          }
  
          return result;
      }
focal_method.class_method_signature: SearchIndexHelperServiceImpl.validateSearchIndexSize(String indexName, int expectedIndexSize)
focal_method.full_signature: protected boolean validateSearchIndexSize(String indexName, int expectedIndexSize)
focal_method.identifier: validateSearchIndexSize
focal_method.invocations: getNumberOfTypesInIndex error
focal_method.modifiers: protected
focal_method.parameters: (String indexName, int expectedIndexSize)
focal_method.return: boolean
focal_method.signature: boolean validateSearchIndexSize(String indexName, int expectedIndexSize)