test_class.declarator: herdJmsDestinationResolver
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      HerdJmsDestinationResolver herdJmsDestinationResolver;
test_class.type: HerdJmsDestinationResolver
test_class.var_name: herdJmsDestinationResolver
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/HerdJmsDestinationResolverTest.java
test_class.identifier: HerdJmsDestinationResolverTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testResolveDestinationSearchIndexUpdate() throws Exception
      {
          Session session = mock(Session.class);
          Queue queue = mock(Queue.class);
  
          // Mock the call to external methods
          when(session.createQueue(any())).thenReturn(queue);
  
          // Call the method under test
          Destination destination =
              herdJmsDestinationResolver.resolveDestinationName(session, HerdJmsDestinationResolver.SQS_DESTINATION_SEARCH_INDEX_UPDATE_QUEUE, false);
  
          assertThat("Destination is null.", destination, not(nullValue()));
  
          // Verify the calls to external methods
          verify(session, times(1)).createQueue(any());
      }
test_case.class_method_signature: HerdJmsDestinationResolverTest.testResolveDestinationSearchIndexUpdate()
test_case.full_signature: @Test public void testResolveDestinationSearchIndexUpdate()
test_case.identifier: testResolveDestinationSearchIndexUpdate
test_case.invocations: mock mock thenReturn when createQueue any resolveDestinationName assertThat not nullValue createQueue verify times any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testResolveDestinationSearchIndexUpdate()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(HerdJmsDestinationResolver.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(HerdJmsDestinationResolver.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: SQS_DESTINATION_HERD_INCOMING = "herd_incoming_queue"
focal_class.modifier: public static final
focal_class.original_string: public static final String SQS_DESTINATION_HERD_INCOMING = "herd_incoming_queue";
focal_class.type: String
focal_class.var_name: SQS_DESTINATION_HERD_INCOMING
focal_class.declarator: SQS_DESTINATION_STORAGE_POLICY_SELECTOR_JOB_SQS_QUEUE = "storage_policy_selector_job_sqs_queue"
focal_class.modifier: public static final
focal_class.original_string: public static final String SQS_DESTINATION_STORAGE_POLICY_SELECTOR_JOB_SQS_QUEUE = "storage_policy_selector_job_sqs_queue";
focal_class.type: String
focal_class.var_name: SQS_DESTINATION_STORAGE_POLICY_SELECTOR_JOB_SQS_QUEUE
focal_class.declarator: SQS_DESTINATION_SAMPLE_DATA_QUEUE = "sample_data_queue"
focal_class.modifier: public static final
focal_class.original_string: public static final String SQS_DESTINATION_SAMPLE_DATA_QUEUE = "sample_data_queue";
focal_class.type: String
focal_class.var_name: SQS_DESTINATION_SAMPLE_DATA_QUEUE
focal_class.declarator: SQS_DESTINATION_SEARCH_INDEX_UPDATE_QUEUE = "search_index_update_queue"
focal_class.modifier: public static final
focal_class.original_string: public static final String SQS_DESTINATION_SEARCH_INDEX_UPDATE_QUEUE = "search_index_update_queue";
focal_class.type: String
focal_class.var_name: SQS_DESTINATION_SEARCH_INDEX_UPDATE_QUEUE
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.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/HerdJmsDestinationResolver.java
focal_class.identifier: HerdJmsDestinationResolver
focal_class.interfaces: implements DestinationResolver
focal_class.class_method_signature: HerdJmsDestinationResolver.resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
focal_class.full_signature: @Override public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
focal_class.identifier: resolveDestinationName
focal_class.modifiers: @Override public
focal_class.parameters: (Session session, String destinationName, boolean pubSubDomain)
focal_class.return: Destination
focal_class.signature: Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
focal_class.class_method_signature: HerdJmsDestinationResolver.getSqsQueueName(ConfigurationValue configurationValue)
focal_class.full_signature: private String getSqsQueueName(ConfigurationValue configurationValue)
focal_class.identifier: getSqsQueueName
focal_class.modifiers: private
focal_class.parameters: (ConfigurationValue configurationValue)
focal_class.return: String
focal_class.signature: String getSqsQueueName(ConfigurationValue configurationValue)
focal_method.body: @Override
      public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException
      {
          String sqsQueueName;
  
          switch (destinationName)
          {
              case SQS_DESTINATION_HERD_INCOMING:
                  // Get the incoming SQS queue name.
                  sqsQueueName = getSqsQueueName(ConfigurationValue.HERD_NOTIFICATION_SQS_INCOMING_QUEUE_NAME);
                  break;
              case SQS_DESTINATION_STORAGE_POLICY_SELECTOR_JOB_SQS_QUEUE:
                  // Get the storage policy selector job SQS queue name.
                  sqsQueueName = getSqsQueueName(ConfigurationValue.STORAGE_POLICY_SELECTOR_JOB_SQS_QUEUE_NAME);
                  break;
              case SQS_DESTINATION_SAMPLE_DATA_QUEUE:
                  // Get the storage policy selector job SQS queue name.
                  sqsQueueName = getSqsQueueName(ConfigurationValue.SAMPLE_DATA_SQS_QUEUE_NAME);
                  break;
              case SQS_DESTINATION_SEARCH_INDEX_UPDATE_QUEUE:
                  // Get the storage policy selector job SQS queue name.
                  sqsQueueName = getSqsQueueName(ConfigurationValue.SEARCH_INDEX_UPDATE_SQS_QUEUE_NAME);
                  break;
              default:
                  LOGGER.warn("Failed to resolve the destination name: \"%s\".", destinationName);
                  sqsQueueName = "";
                  break;
          }
  
          Destination destination;
  
          try
          {
              destination = session.createQueue(sqsQueueName);
          }
          catch (Exception ex)
          {
              throw new IllegalStateException(String.format("Failed to resolve the SQS queue: \"%s\".", sqsQueueName), ex);
          }
  
          return destination;
      }
focal_method.class_method_signature: HerdJmsDestinationResolver.resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
focal_method.full_signature: @Override public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)
focal_method.identifier: resolveDestinationName
focal_method.invocations: getSqsQueueName getSqsQueueName getSqsQueueName getSqsQueueName warn createQueue format
focal_method.modifiers: @Override public
focal_method.parameters: (Session session, String destinationName, boolean pubSubDomain)
focal_method.return: Destination
focal_method.signature: Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain)