test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/MessageTypeDaoHelperTest.java
test_class.identifier: MessageTypeDaoHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testGetMessageTypeEntity()
      {
          // Create and persist a message type entity.
          MessageTypeEntity messageTypeEntity = messageTypeDaoTestHelper.createMessageTypeEntity(MESSAGE_TYPE);
  
          // Retrieve the message type entity and validate the result.
          assertEquals(messageTypeEntity, messageTypeDaoHelper.getMessageTypeEntity(MESSAGE_TYPE));
  
          // Test case insensitivity of the message type code.
          assertEquals(messageTypeEntity, messageTypeDaoHelper.getMessageTypeEntity(MESSAGE_TYPE.toUpperCase()));
          assertEquals(messageTypeEntity, messageTypeDaoHelper.getMessageTypeEntity(MESSAGE_TYPE.toLowerCase()));
  
          // Try to retrieve a non existing message type.
          try
          {
              messageTypeDaoHelper.getMessageTypeEntity(I_DO_NOT_EXIST);
              fail();
          }
          catch (ObjectNotFoundException e)
          {
              assertEquals(String.format("Message type with code \"%s\" doesn't exist.", I_DO_NOT_EXIST), e.getMessage());
          }
      }
test_case.class_method_signature: MessageTypeDaoHelperTest.testGetMessageTypeEntity()
test_case.full_signature: @Test public void testGetMessageTypeEntity()
test_case.identifier: testGetMessageTypeEntity
test_case.invocations: createMessageTypeEntity assertEquals getMessageTypeEntity assertEquals getMessageTypeEntity toUpperCase assertEquals getMessageTypeEntity toLowerCase getMessageTypeEntity fail assertEquals format getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetMessageTypeEntity()
focal_class.declarator: messageTypeDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private MessageTypeDao messageTypeDao;
focal_class.type: MessageTypeDao
focal_class.var_name: messageTypeDao
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/MessageTypeDaoHelper.java
focal_class.identifier: MessageTypeDaoHelper
focal_class.class_method_signature: MessageTypeDaoHelper.getMessageTypeEntity(String code)
focal_class.full_signature: public MessageTypeEntity getMessageTypeEntity(String code)
focal_class.identifier: getMessageTypeEntity
focal_class.modifiers: public
focal_class.parameters: (String code)
focal_class.return: MessageTypeEntity
focal_class.signature: MessageTypeEntity getMessageTypeEntity(String code)
focal_method.body: public MessageTypeEntity getMessageTypeEntity(String code)
      {
          MessageTypeEntity messageTypeEntity = messageTypeDao.getMessageTypeByCode(code);
  
          if (messageTypeEntity == null)
          {
              throw new ObjectNotFoundException(String.format("Message type with code \"%s\" doesn't exist.", code));
          }
  
          return messageTypeEntity;
      }
focal_method.class_method_signature: MessageTypeDaoHelper.getMessageTypeEntity(String code)
focal_method.full_signature: public MessageTypeEntity getMessageTypeEntity(String code)
focal_method.identifier: getMessageTypeEntity
focal_method.invocations: getMessageTypeByCode format
focal_method.modifiers: public
focal_method.parameters: (String code)
focal_method.return: MessageTypeEntity
focal_method.signature: MessageTypeEntity getMessageTypeEntity(String code)