test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/StorageUnitStatusDaoHelperTest.java
test_class.identifier: StorageUnitStatusDaoHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testGetStorageUnitStatusEntity()
      {
          // Create and persist database entities required for testing.
          List<StorageUnitStatusEntity> storageUnitStatusEntity = Arrays.asList(storageUnitStatusDaoTestHelper.createStorageUnitStatusEntity(STORAGE_UNIT_STATUS),
              storageUnitStatusDaoTestHelper.createStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2));
  
          // Retrieve the storage unit status entity.
          assertEquals(storageUnitStatusEntity.get(0), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS));
          assertEquals(storageUnitStatusEntity.get(1), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2));
  
          // Test case insensitivity of the storage unit status code.
          assertEquals(storageUnitStatusEntity.get(0), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS.toUpperCase()));
          assertEquals(storageUnitStatusEntity.get(0), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS.toLowerCase()));
  
          // Try to retrieve a non existing storage unit status.
          try
          {
              storageUnitStatusDaoHelper.getStorageUnitStatusEntity("I_DO_NOT_EXIST");
              fail("Should throw an ObjectNotFoundException.");
          }
          catch (ObjectNotFoundException e)
          {
              assertEquals("Storage unit status \"I_DO_NOT_EXIST\" doesn't exist.", e.getMessage());
          }
      }
test_case.class_method_signature: StorageUnitStatusDaoHelperTest.testGetStorageUnitStatusEntity()
test_case.full_signature: @Test public void testGetStorageUnitStatusEntity()
test_case.identifier: testGetStorageUnitStatusEntity
test_case.invocations: asList createStorageUnitStatusEntity createStorageUnitStatusEntity assertEquals get getStorageUnitStatusEntity assertEquals get getStorageUnitStatusEntity assertEquals get getStorageUnitStatusEntity toUpperCase assertEquals get getStorageUnitStatusEntity toLowerCase getStorageUnitStatusEntity fail assertEquals getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetStorageUnitStatusEntity()
focal_class.declarator: storageUnitStatusDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitStatusDao storageUnitStatusDao;
focal_class.type: StorageUnitStatusDao
focal_class.var_name: storageUnitStatusDao
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/StorageUnitStatusDaoHelper.java
focal_class.identifier: StorageUnitStatusDaoHelper
focal_class.class_method_signature: StorageUnitStatusDaoHelper.getStorageUnitStatusEntity(String code)
focal_class.full_signature: public StorageUnitStatusEntity getStorageUnitStatusEntity(String code)
focal_class.identifier: getStorageUnitStatusEntity
focal_class.modifiers: public
focal_class.parameters: (String code)
focal_class.return: StorageUnitStatusEntity
focal_class.signature: StorageUnitStatusEntity getStorageUnitStatusEntity(String code)
focal_method.body: public StorageUnitStatusEntity getStorageUnitStatusEntity(String code) throws ObjectNotFoundException
      {
          StorageUnitStatusEntity storageUnitStatusEntity = storageUnitStatusDao.getStorageUnitStatusByCode(code);
  
          if (storageUnitStatusEntity == null)
          {
              throw new ObjectNotFoundException(String.format("Storage unit status \"%s\" doesn't exist.", code));
          }
  
          return storageUnitStatusEntity;
      }
focal_method.class_method_signature: StorageUnitStatusDaoHelper.getStorageUnitStatusEntity(String code)
focal_method.full_signature: public StorageUnitStatusEntity getStorageUnitStatusEntity(String code)
focal_method.identifier: getStorageUnitStatusEntity
focal_method.invocations: getStorageUnitStatusByCode format
focal_method.modifiers: public
focal_method.parameters: (String code)
focal_method.return: StorageUnitStatusEntity
focal_method.signature: StorageUnitStatusEntity getStorageUnitStatusEntity(String code)