test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/BusinessObjectDataRetryStoragePolicyTransitionHelperTest.java
test_class.identifier: BusinessObjectDataRetryStoragePolicyTransitionHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testSendStoragePolicySelectionSqsMessageSqsOperationFails()
      {
          // Create a business object data key.
          BusinessObjectDataKey businessObjectDataKey =
              new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES,
                  DATA_VERSION);
  
          // Create a storage policy key.
          StoragePolicyKey storagePolicyKey = new StoragePolicyKey(STORAGE_POLICY_NAMESPACE_CD, STORAGE_POLICY_NAME);
  
          // Try to execute AWS steps when AWS service exception is expected.
          try
          {
              businessObjectDataRetryStoragePolicyTransitionHelper.sendStoragePolicySelectionSqsMessage(MockSqsOperationsImpl.MOCK_SQS_QUEUE_NOT_FOUND_NAME,
                  new StoragePolicySelection(businessObjectDataKey, storagePolicyKey, INITIAL_VERSION));
              fail();
          }
          catch (IllegalStateException e)
          {
              assertEquals(String.format("AWS SQS queue with \"%s\" name not found.", MockSqsOperationsImpl.MOCK_SQS_QUEUE_NOT_FOUND_NAME), e.getMessage());
          }
      }
test_case.class_method_signature: BusinessObjectDataRetryStoragePolicyTransitionHelperTest.testSendStoragePolicySelectionSqsMessageSqsOperationFails()
test_case.full_signature: @Test public void testSendStoragePolicySelectionSqsMessageSqsOperationFails()
test_case.identifier: testSendStoragePolicySelectionSqsMessageSqsOperationFails
test_case.invocations: sendStoragePolicySelectionSqsMessage fail assertEquals format getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSendStoragePolicySelectionSqsMessageSqsOperationFails()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(BusinessObjectDataRetryStoragePolicyTransitionHelper.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(BusinessObjectDataRetryStoragePolicyTransitionHelper.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: awsHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AwsHelper awsHelper;
focal_class.type: AwsHelper
focal_class.var_name: awsHelper
focal_class.declarator: businessObjectDataDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataDaoHelper businessObjectDataDaoHelper;
focal_class.type: BusinessObjectDataDaoHelper
focal_class.var_name: businessObjectDataDaoHelper
focal_class.declarator: businessObjectDataHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataHelper businessObjectDataHelper;
focal_class.type: BusinessObjectDataHelper
focal_class.var_name: businessObjectDataHelper
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
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.declarator: s3KeyPrefixHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private S3KeyPrefixHelper s3KeyPrefixHelper;
focal_class.type: S3KeyPrefixHelper
focal_class.var_name: s3KeyPrefixHelper
focal_class.declarator: sqsDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SqsDao sqsDao;
focal_class.type: SqsDao
focal_class.var_name: sqsDao
focal_class.declarator: storagePolicyDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StoragePolicyDaoHelper storagePolicyDaoHelper;
focal_class.type: StoragePolicyDaoHelper
focal_class.var_name: storagePolicyDaoHelper
focal_class.declarator: storagePolicyHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StoragePolicyHelper storagePolicyHelper;
focal_class.type: StoragePolicyHelper
focal_class.var_name: storagePolicyHelper
focal_class.declarator: storageUnitDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitDao storageUnitDao;
focal_class.type: StorageUnitDao
focal_class.var_name: storageUnitDao
focal_class.declarator: storageUnitDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitDaoHelper storageUnitDaoHelper;
focal_class.type: StorageUnitDaoHelper
focal_class.var_name: storageUnitDaoHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/BusinessObjectDataRetryStoragePolicyTransitionHelper.java
focal_class.identifier: BusinessObjectDataRetryStoragePolicyTransitionHelper
focal_class.class_method_signature: BusinessObjectDataRetryStoragePolicyTransitionHelper.retryStoragePolicyTransition(BusinessObjectDataKey businessObjectDataKey,
          BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_class.full_signature: public BusinessObjectData retryStoragePolicyTransition(BusinessObjectDataKey businessObjectDataKey,
          BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_class.identifier: retryStoragePolicyTransition
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataKey businessObjectDataKey,
          BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_class.return: BusinessObjectData
focal_class.signature: BusinessObjectData retryStoragePolicyTransition(BusinessObjectDataKey businessObjectDataKey,
          BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_class.class_method_signature: BusinessObjectDataRetryStoragePolicyTransitionHelper.sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection)
focal_class.full_signature: protected void sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection)
focal_class.identifier: sendStoragePolicySelectionSqsMessage
focal_class.modifiers: protected
focal_class.parameters: (String sqsQueueName, StoragePolicySelection storagePolicySelection)
focal_class.return: void
focal_class.signature: void sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection)
focal_class.class_method_signature: BusinessObjectDataRetryStoragePolicyTransitionHelper.getStorageUnit(BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.full_signature: private StorageUnitEntity getStorageUnit(BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.identifier: getStorageUnit
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.return: StorageUnitEntity
focal_class.signature: StorageUnitEntity getStorageUnit(BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.class_method_signature: BusinessObjectDataRetryStoragePolicyTransitionHelper.validateBusinessObjectDataRetryStoragePolicyTransitionRequest(BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_class.full_signature: private void validateBusinessObjectDataRetryStoragePolicyTransitionRequest(BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_class.identifier: validateBusinessObjectDataRetryStoragePolicyTransitionRequest
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_class.return: void
focal_class.signature: void validateBusinessObjectDataRetryStoragePolicyTransitionRequest(BusinessObjectDataRetryStoragePolicyTransitionRequest request)
focal_method.body: protected void sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection)
      {
          // Send the storage policy selection to the relative AWS SQS queue.
          AwsParamsDto awsParamsDto = awsHelper.getAwsParamsDto();
          String messageText = null;
          try
          {
              messageText = jsonHelper.objectToJson(storagePolicySelection);
              sqsDao.sendMessage(awsParamsDto, sqsQueueName, messageText, null);
          }
          catch (RuntimeException e)
          {
              LOGGER.error("Failed to publish message to the JMS queue. jmsQueueName=\"{}\" jmsMessagePayload={}", sqsQueueName, messageText);
  
              // Rethrow the original exception.
              throw e;
          }
      }
focal_method.class_method_signature: BusinessObjectDataRetryStoragePolicyTransitionHelper.sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection)
focal_method.full_signature: protected void sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection)
focal_method.identifier: sendStoragePolicySelectionSqsMessage
focal_method.invocations: getAwsParamsDto objectToJson sendMessage error
focal_method.modifiers: protected
focal_method.parameters: (String sqsQueueName, StoragePolicySelection storagePolicySelection)
focal_method.return: void
focal_method.signature: void sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection)