test_class.declarator: alternateKeyHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AlternateKeyHelper alternateKeyHelper;
test_class.type: AlternateKeyHelper
test_class.var_name: alternateKeyHelper
test_class.declarator: businessObjectDefinitionHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private BusinessObjectDefinitionHelper businessObjectDefinitionHelper;
test_class.type: BusinessObjectDefinitionHelper
test_class.var_name: businessObjectDefinitionHelper
test_class.declarator: jsonHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private JsonHelper jsonHelper;
test_class.type: JsonHelper
test_class.var_name: jsonHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/BusinessObjectDefinitionHelperTest.java
test_class.identifier: BusinessObjectDefinitionHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testExecuteFunctionForBusinessObjectDefinitionEntitiesJsonParseException()
      {
          // Create a list of business object definition entities.
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities = Collections.unmodifiableList(Arrays.asList(
              businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, BDEF_DESCRIPTION,
                  businessObjectDefinitionServiceTestHelper.getNewAttributes()), businessObjectDefinitionDaoTestHelper
                  .createBusinessObjectDefinitionEntity(BDEF_NAMESPACE_2, BDEF_NAME_2, DATA_PROVIDER_NAME_2, BDEF_DESCRIPTION_2,
                      businessObjectDefinitionServiceTestHelper.getNewAttributes2())));
  
          businessObjectDefinitionEntities.forEach(entity ->
          {
              entity.setDescriptiveBusinessObjectFormat(new BusinessObjectFormatEntity());
              entity.getDescriptiveBusinessObjectFormat().setSchemaColumns(new ArrayList<>());
  
              entity.setSubjectMatterExperts(new ArrayList<>());
          });
  
          // Mock the external calls.
          when(jsonHelper.objectToJson(any()))
              .thenThrow(new IllegalStateException(new JsonParseException("Failed to Parse", new JsonLocation("SRC", 100L, 1, 2))));
  
          // Execute a function for all business object definition entities.
          businessObjectDefinitionHelper
              .executeFunctionForBusinessObjectDefinitionEntities(SEARCH_INDEX_NAME, businessObjectDefinitionEntities,
                  (indexName, id, json) ->
                  {
                  });
  
          // Verify the external calls.
          verify(jsonHelper, times(businessObjectDefinitionEntities.size())).objectToJson(any());
          verifyNoMoreInteractions(alternateKeyHelper, jsonHelper);
      }
test_case.class_method_signature: BusinessObjectDefinitionHelperTest.testExecuteFunctionForBusinessObjectDefinitionEntitiesJsonParseException()
test_case.full_signature: @Test public void testExecuteFunctionForBusinessObjectDefinitionEntitiesJsonParseException()
test_case.identifier: testExecuteFunctionForBusinessObjectDefinitionEntitiesJsonParseException
test_case.invocations: unmodifiableList asList createBusinessObjectDefinitionEntity getNewAttributes createBusinessObjectDefinitionEntity getNewAttributes2 forEach setDescriptiveBusinessObjectFormat setSchemaColumns getDescriptiveBusinessObjectFormat setSubjectMatterExperts thenThrow when objectToJson any executeFunctionForBusinessObjectDefinitionEntities objectToJson verify times size any verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExecuteFunctionForBusinessObjectDefinitionEntitiesJsonParseException()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(BusinessObjectDefinitionHelper.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(BusinessObjectDefinitionHelper.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: alternateKeyHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AlternateKeyHelper alternateKeyHelper;
focal_class.type: AlternateKeyHelper
focal_class.var_name: alternateKeyHelper
focal_class.declarator: jsonHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private JsonHelper jsonHelper;
focal_class.type: JsonHelper
focal_class.var_name: jsonHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/BusinessObjectDefinitionHelper.java
focal_class.identifier: BusinessObjectDefinitionHelper
focal_class.class_method_signature: BusinessObjectDefinitionHelper.businessObjectDefinitionKeyToString(BusinessObjectDefinitionKey businessObjectDefinitionKey)
focal_class.full_signature: public String businessObjectDefinitionKeyToString(BusinessObjectDefinitionKey businessObjectDefinitionKey)
focal_class.identifier: businessObjectDefinitionKeyToString
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDefinitionKey businessObjectDefinitionKey)
focal_class.return: String
focal_class.signature: String businessObjectDefinitionKeyToString(BusinessObjectDefinitionKey businessObjectDefinitionKey)
focal_class.class_method_signature: BusinessObjectDefinitionHelper.executeFunctionForBusinessObjectDefinitionEntities(final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
focal_class.full_signature: public void executeFunctionForBusinessObjectDefinitionEntities(final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
focal_class.identifier: executeFunctionForBusinessObjectDefinitionEntities
focal_class.modifiers: public
focal_class.parameters: (final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
focal_class.return: void
focal_class.signature: void executeFunctionForBusinessObjectDefinitionEntities(final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
focal_class.class_method_signature: BusinessObjectDefinitionHelper.getBusinessObjectDefinitionKey(BusinessObjectDefinitionColumnKey businessObjectDefinitionColumnKey)
focal_class.full_signature: public BusinessObjectDefinitionKey getBusinessObjectDefinitionKey(BusinessObjectDefinitionColumnKey businessObjectDefinitionColumnKey)
focal_class.identifier: getBusinessObjectDefinitionKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDefinitionColumnKey businessObjectDefinitionColumnKey)
focal_class.return: BusinessObjectDefinitionKey
focal_class.signature: BusinessObjectDefinitionKey getBusinessObjectDefinitionKey(BusinessObjectDefinitionColumnKey businessObjectDefinitionColumnKey)
focal_class.class_method_signature: BusinessObjectDefinitionHelper.validateBusinessObjectDefinitionKey(BusinessObjectDefinitionKey key)
focal_class.full_signature: public void validateBusinessObjectDefinitionKey(BusinessObjectDefinitionKey key)
focal_class.identifier: validateBusinessObjectDefinitionKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDefinitionKey key)
focal_class.return: void
focal_class.signature: void validateBusinessObjectDefinitionKey(BusinessObjectDefinitionKey key)
focal_class.class_method_signature: BusinessObjectDefinitionHelper.safeObjectMapperWriteValueAsString(final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_class.full_signature: public String safeObjectMapperWriteValueAsString(final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_class.identifier: safeObjectMapperWriteValueAsString
focal_class.modifiers: public
focal_class.parameters: (final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_class.return: String
focal_class.signature: String safeObjectMapperWriteValueAsString(final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_class.class_method_signature: BusinessObjectDefinitionHelper.processTagSearchScoreMultiplier(final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_class.full_signature: public void processTagSearchScoreMultiplier(final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_class.identifier: processTagSearchScoreMultiplier
focal_class.modifiers: public
focal_class.parameters: (final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_class.return: void
focal_class.signature: void processTagSearchScoreMultiplier(final BusinessObjectDefinitionEntity businessObjectDefinitionEntity)
focal_method.body: public void executeFunctionForBusinessObjectDefinitionEntities(final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
      {
          // For each business object definition apply the passed in function
          businessObjectDefinitionEntities.forEach(businessObjectDefinitionEntity ->
          {
              // Fetch Join with .size()
              businessObjectDefinitionEntity.getAttributes().size();
              businessObjectDefinitionEntity.getBusinessObjectDefinitionTags().size();
              businessObjectDefinitionEntity.getBusinessObjectFormats().size();
              businessObjectDefinitionEntity.getColumns().size();
              businessObjectDefinitionEntity.getSampleDataFiles().size();
              businessObjectDefinitionEntity.getSubjectMatterExperts().size();
  
              // Convert the business object definition entity to a JSON string
              final String jsonString = safeObjectMapperWriteValueAsString(businessObjectDefinitionEntity);
  
              if (StringUtils.isNotEmpty(jsonString))
              {
                  // Call the function that will process each business object definition entity against the index
                  try
                  {
                      function.accept(indexName, businessObjectDefinitionEntity.getId().toString(), jsonString);
                  }
                  catch (Exception ex)
                  {
                      LOGGER.warn("Index operation exception is logged {} for {}, {}, {}", ex, indexName, businessObjectDefinitionEntity.getId().toString(),
                          jsonString);
                  }
              }
          });
  
          LOGGER.info("Finished processing {} business object definitions with a search index function.", businessObjectDefinitionEntities.size());
      }
focal_method.class_method_signature: BusinessObjectDefinitionHelper.executeFunctionForBusinessObjectDefinitionEntities(final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
focal_method.full_signature: public void executeFunctionForBusinessObjectDefinitionEntities(final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
focal_method.identifier: executeFunctionForBusinessObjectDefinitionEntities
focal_method.invocations: forEach size getAttributes size getBusinessObjectDefinitionTags size getBusinessObjectFormats size getColumns size getSampleDataFiles size getSubjectMatterExperts safeObjectMapperWriteValueAsString isNotEmpty accept toString getId warn toString getId info size
focal_method.modifiers: public
focal_method.parameters: (final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)
focal_method.return: void
focal_method.signature: void executeFunctionForBusinessObjectDefinitionEntities(final String indexName,
          final List<BusinessObjectDefinitionEntity> businessObjectDefinitionEntities, final TriConsumer<String, String, String> function)