BusinessObjectDataRetryStoragePolicyTransitionHelper { protected void sendStoragePolicySelectionSqsMessage(String sqsQueueName, StoragePolicySelection storagePolicySelection) { 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); throw e; } }  BusinessObjectData retryStoragePolicyTransition(BusinessObjectDataKey businessObjectDataKey,
        BusinessObjectDataRetryStoragePolicyTransitionRequest request);  }
@Test public void testSendStoragePolicySelectionSqsMessageSqsOperationFails() { BusinessObjectDataKey businessObjectDataKey = new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION); StoragePolicyKey storagePolicyKey = new StoragePolicyKey(STORAGE_POLICY_NAMESPACE_CD, STORAGE_POLICY_NAME); 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()); } }