test_class.declarator: businessObjectDataHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataHelper businessObjectDataHelper;
test_class.type: BusinessObjectDataHelper
test_class.var_name: businessObjectDataHelper
test_class.declarator: messageNotificationEventService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private MessageNotificationEventService messageNotificationEventService;
test_class.type: MessageNotificationEventService
test_class.var_name: messageNotificationEventService
test_class.declarator: storageDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageDao storageDao;
test_class.type: StorageDao
test_class.var_name: storageDao
test_class.declarator: storageUnitDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitDao storageUnitDao;
test_class.type: StorageUnitDao
test_class.var_name: storageUnitDao
test_class.declarator: storageUnitDaoHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private StorageUnitDaoHelper storageUnitDaoHelper;
test_class.type: StorageUnitDaoHelper
test_class.var_name: storageUnitDaoHelper
test_class.declarator: storageUnitStatusDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitStatusDaoHelper storageUnitStatusDaoHelper;
test_class.type: StorageUnitStatusDaoHelper
test_class.var_name: storageUnitStatusDaoHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/StorageUnitDaoHelperTest.java
test_class.identifier: StorageUnitDaoHelperTest
test_case.body: @Test
      public void testUpdateStorageUnitStatusNewStatusPassedAsString()
      {
          // 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 business object data entity.
          BusinessObjectDataEntity businessObjectDataEntity = new BusinessObjectDataEntity();
  
          // Create a storage entity.
          StorageEntity storageEntity = new StorageEntity();
          storageEntity.setName(STORAGE_NAME);
  
          // Create a storage status entity.
          StorageUnitStatusEntity oldStorageUnitStatusEntity = new StorageUnitStatusEntity();
          oldStorageUnitStatusEntity.setCode(STORAGE_UNIT_STATUS);
  
          // Create a storage status entity.
          StorageUnitStatusEntity newStorageUnitStatusEntity = new StorageUnitStatusEntity();
          newStorageUnitStatusEntity.setCode(STORAGE_UNIT_STATUS_2);
  
          // Create a storage unit entity.
          StorageUnitEntity storageUnitEntity = new StorageUnitEntity();
          storageUnitEntity.setBusinessObjectData(businessObjectDataEntity);
          storageUnitEntity.setStorage(storageEntity);
          storageUnitEntity.setStatus(oldStorageUnitStatusEntity);
          storageUnitEntity.setHistoricalStatuses(new ArrayList<>());
  
          // Mock the external calls.
          when(storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2)).thenReturn(newStorageUnitStatusEntity);
          when(businessObjectDataHelper.getBusinessObjectDataKey(businessObjectDataEntity)).thenReturn(businessObjectDataKey);
  
          // Call the method under test.
          storageUnitDaoHelper.updateStorageUnitStatus(storageUnitEntity, STORAGE_UNIT_STATUS_2, STORAGE_UNIT_STATUS_2);
  
          // Validate the results.
          assertEquals(STORAGE_UNIT_STATUS_2, storageUnitEntity.getStatus().getCode());
  
          // Verify the external calls.
          verify(storageUnitStatusDaoHelper).getStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2);
          verify(storageUnitDao).saveAndRefresh(storageUnitEntity);
          verify(businessObjectDataHelper).getBusinessObjectDataKey(businessObjectDataEntity);
          verify(messageNotificationEventService)
              .processStorageUnitStatusChangeNotificationEvent(businessObjectDataKey, STORAGE_NAME, STORAGE_UNIT_STATUS_2, STORAGE_UNIT_STATUS);
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: StorageUnitDaoHelperTest.testUpdateStorageUnitStatusNewStatusPassedAsString()
test_case.full_signature: @Test public void testUpdateStorageUnitStatusNewStatusPassedAsString()
test_case.identifier: testUpdateStorageUnitStatusNewStatusPassedAsString
test_case.invocations: setName setCode setCode setBusinessObjectData setStorage setStatus setHistoricalStatuses thenReturn when getStorageUnitStatusEntity thenReturn when getBusinessObjectDataKey updateStorageUnitStatus assertEquals getCode getStatus getStorageUnitStatusEntity verify saveAndRefresh verify getBusinessObjectDataKey verify processStorageUnitStatusChangeNotificationEvent verify verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdateStorageUnitStatusNewStatusPassedAsString()
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: businessObjectFormatHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectFormatHelper businessObjectFormatHelper;
focal_class.type: BusinessObjectFormatHelper
focal_class.var_name: businessObjectFormatHelper
focal_class.declarator: messageNotificationEventService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private MessageNotificationEventService messageNotificationEventService;
focal_class.type: MessageNotificationEventService
focal_class.var_name: messageNotificationEventService
focal_class.declarator: storageDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageDao storageDao;
focal_class.type: StorageDao
focal_class.var_name: storageDao
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: storageUnitStatusDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitStatusDaoHelper storageUnitStatusDaoHelper;
focal_class.type: StorageUnitStatusDaoHelper
focal_class.var_name: storageUnitStatusDaoHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/StorageUnitDaoHelper.java
focal_class.identifier: StorageUnitDaoHelper
focal_class.class_method_signature: StorageUnitDaoHelper.findExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectFormat businessObjectFormat, BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: public StorageUnitEntity findExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectFormat businessObjectFormat, BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: findExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData
focal_class.modifiers: public
focal_class.parameters: (StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectFormat businessObjectFormat, BusinessObjectDataKey businessObjectDataKey)
focal_class.return: StorageUnitEntity
focal_class.signature: StorageUnitEntity findExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectFormat businessObjectFormat, BusinessObjectDataKey businessObjectDataKey)
focal_class.class_method_signature: StorageUnitDaoHelper.getStorageUnitEntity(String storageName, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: public StorageUnitEntity getStorageUnitEntity(String storageName, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: getStorageUnitEntity
focal_class.modifiers: public
focal_class.parameters: (String storageName, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: StorageUnitEntity
focal_class.signature: StorageUnitEntity getStorageUnitEntity(String storageName, BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: StorageUnitDaoHelper.getStorageUnitEntityByBusinessObjectDataAndStorage(BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.full_signature: public StorageUnitEntity getStorageUnitEntityByBusinessObjectDataAndStorage(BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.identifier: getStorageUnitEntityByBusinessObjectDataAndStorage
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.return: StorageUnitEntity
focal_class.signature: StorageUnitEntity getStorageUnitEntityByBusinessObjectDataAndStorage(BusinessObjectDataEntity businessObjectDataEntity, StorageEntity storageEntity)
focal_class.class_method_signature: StorageUnitDaoHelper.getStorageUnitEntityByKey(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.full_signature: public StorageUnitEntity getStorageUnitEntityByKey(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.identifier: getStorageUnitEntityByKey
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.return: StorageUnitEntity
focal_class.signature: StorageUnitEntity getStorageUnitEntityByKey(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.class_method_signature: StorageUnitDaoHelper.setStorageUnitStatus(StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity)
focal_class.full_signature: public void setStorageUnitStatus(StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity)
focal_class.identifier: setStorageUnitStatus
focal_class.modifiers: public
focal_class.parameters: (StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity)
focal_class.return: void
focal_class.signature: void setStorageUnitStatus(StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity)
focal_class.class_method_signature: StorageUnitDaoHelper.updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
focal_class.full_signature: public void updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
focal_class.identifier: updateStorageUnitStatus
focal_class.modifiers: public
focal_class.parameters: (StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
focal_class.return: void
focal_class.signature: void updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
focal_class.class_method_signature: StorageUnitDaoHelper.updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity, String reason)
focal_class.full_signature: public void updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity, String reason)
focal_class.identifier: updateStorageUnitStatus
focal_class.modifiers: public
focal_class.parameters: (StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity, String reason)
focal_class.return: void
focal_class.signature: void updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, StorageUnitStatusEntity storageUnitStatusEntity, String reason)
focal_class.class_method_signature: StorageUnitDaoHelper.validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey, String s3KeyPrefix)
focal_class.full_signature: public void validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey, String s3KeyPrefix)
focal_class.identifier: validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData
focal_class.modifiers: public
focal_class.parameters: (StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey, String s3KeyPrefix)
focal_class.return: void
focal_class.signature: void validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(StorageEntity storageEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey, String s3KeyPrefix)
focal_method.body: public void updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
      {
          // Retrieve and ensure the new storage unit status is valid.
          StorageUnitStatusEntity storageUnitStatusEntity = storageUnitStatusDaoHelper.getStorageUnitStatusEntity(storageUnitStatus);
  
          // Update the storage unit status.
          updateStorageUnitStatus(storageUnitEntity, storageUnitStatusEntity, reason);
      }
focal_method.class_method_signature: StorageUnitDaoHelper.updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
focal_method.full_signature: public void updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
focal_method.identifier: updateStorageUnitStatus
focal_method.invocations: getStorageUnitStatusEntity updateStorageUnitStatus
focal_method.modifiers: public
focal_method.parameters: (StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)
focal_method.return: void
focal_method.signature: void updateStorageUnitStatus(StorageUnitEntity storageUnitEntity, String storageUnitStatus, String reason)