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: businessObjectDataStorageUnitStatusServiceImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private BusinessObjectDataStorageUnitStatusServiceImpl businessObjectDataStorageUnitStatusServiceImpl;
test_class.type: BusinessObjectDataStorageUnitStatusServiceImpl
test_class.var_name: businessObjectDataStorageUnitStatusServiceImpl
test_class.declarator: storageUnitDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitDaoHelper storageUnitDaoHelper;
test_class.type: StorageUnitDaoHelper
test_class.var_name: storageUnitDaoHelper
test_class.declarator: storageUnitHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitHelper storageUnitHelper;
test_class.type: StorageUnitHelper
test_class.var_name: storageUnitHelper
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/impl/BusinessObjectDataStorageUnitStatusServiceImplTest.java
test_class.identifier: BusinessObjectDataStorageUnitStatusServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testUpdateBusinessObjectDataStorageUnitStatusImplMissingStorageUnitStatus()
      {
          // Create a business object data storage unit key.
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey =
              new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                  SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME);
  
          // Try to call the method under test when update request has a blank business object data storage unit status.
          try
          {
              businessObjectDataStorageUnitStatusServiceImpl.updateBusinessObjectDataStorageUnitStatusImpl(businessObjectDataStorageUnitKey,
                  new BusinessObjectDataStorageUnitStatusUpdateRequest(BLANK_TEXT));
              fail();
          }
          catch (IllegalArgumentException e)
          {
              assertEquals("A business object data storage unit status must be specified.", e.getMessage());
          }
  
          // Verify the external calls.
          verify(storageUnitHelper).validateBusinessObjectDataStorageUnitKey(businessObjectDataStorageUnitKey);
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: BusinessObjectDataStorageUnitStatusServiceImplTest.testUpdateBusinessObjectDataStorageUnitStatusImplMissingStorageUnitStatus()
test_case.full_signature: @Test public void testUpdateBusinessObjectDataStorageUnitStatusImplMissingStorageUnitStatus()
test_case.identifier: testUpdateBusinessObjectDataStorageUnitStatusImplMissingStorageUnitStatus
test_case.invocations: updateBusinessObjectDataStorageUnitStatusImpl fail assertEquals getMessage validateBusinessObjectDataStorageUnitKey verify verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdateBusinessObjectDataStorageUnitStatusImplMissingStorageUnitStatus()
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: storageUnitDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitDaoHelper storageUnitDaoHelper;
focal_class.type: StorageUnitDaoHelper
focal_class.var_name: storageUnitDaoHelper
focal_class.declarator: storageUnitHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitHelper storageUnitHelper;
focal_class.type: StorageUnitHelper
focal_class.var_name: storageUnitHelper
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/impl/BusinessObjectDataStorageUnitStatusServiceImpl.java
focal_class.identifier: BusinessObjectDataStorageUnitStatusServiceImpl
focal_class.interfaces: implements BusinessObjectDataStorageUnitStatusService
focal_class.class_method_signature: BusinessObjectDataStorageUnitStatusServiceImpl.updateBusinessObjectDataStorageUnitStatus(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_class.full_signature: @PublishNotificationMessages @NamespacePermission(fields = "#businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatus(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_class.identifier: updateBusinessObjectDataStorageUnitStatus
focal_class.modifiers: @PublishNotificationMessages @NamespacePermission(fields = "#businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_class.return: BusinessObjectDataStorageUnitStatusUpdateResponse
focal_class.signature: BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatus(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_class.class_method_signature: BusinessObjectDataStorageUnitStatusServiceImpl.updateBusinessObjectDataStorageUnitStatusImpl(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_class.full_signature: protected BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatusImpl(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_class.identifier: updateBusinessObjectDataStorageUnitStatusImpl
focal_class.modifiers: protected
focal_class.parameters: (
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_class.return: BusinessObjectDataStorageUnitStatusUpdateResponse
focal_class.signature: BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatusImpl(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_method.body: protected BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatusImpl(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
      {
          // Validate and trim the business object data storage unit key.
          storageUnitHelper.validateBusinessObjectDataStorageUnitKey(businessObjectDataStorageUnitKey);
  
          // Validate status.
          Assert.hasText(request.getStatus(), "A business object data storage unit status must be specified.");
          request.setStatus(request.getStatus().trim());
  
          // Retrieve and ensure that a business object data storage unit exists with the specified key.
          StorageUnitEntity storageUnitEntity = storageUnitDaoHelper.getStorageUnitEntityByKey(businessObjectDataStorageUnitKey);
  
          // Retrieve and ensure the new storage unit status entity exists.
          StorageUnitStatusEntity newStorageUnitStatusEntity = storageUnitStatusDaoHelper.getStorageUnitStatusEntity(request.getStatus());
  
          // Save the old storage unit status value.
          String oldStorageUnitStatus = storageUnitEntity.getStatus().getCode();
  
          // Update the storage unit status.
          storageUnitDaoHelper.updateStorageUnitStatus(storageUnitEntity, newStorageUnitStatusEntity, request.getStatus());
  
          // Get business object data key from the business object data entity.
          BusinessObjectDataKey businessObjectDataKey = businessObjectDataHelper.createBusinessObjectDataKeyFromEntity(storageUnitEntity.getBusinessObjectData());
  
          // Create and return the business object data storage unit status response object.
          BusinessObjectDataStorageUnitStatusUpdateResponse response = new BusinessObjectDataStorageUnitStatusUpdateResponse();
          response.setBusinessObjectDataStorageUnitKey(
              storageUnitHelper.createBusinessObjectDataStorageUnitKey(businessObjectDataKey, storageUnitEntity.getStorage().getName()));
          response.setStatus(storageUnitEntity.getStatus().getCode());
          response.setPreviousStatus(oldStorageUnitStatus);
  
          return response;
      }
focal_method.class_method_signature: BusinessObjectDataStorageUnitStatusServiceImpl.updateBusinessObjectDataStorageUnitStatusImpl(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_method.full_signature: protected BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatusImpl(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_method.identifier: updateBusinessObjectDataStorageUnitStatusImpl
focal_method.invocations: validateBusinessObjectDataStorageUnitKey hasText getStatus setStatus trim getStatus getStorageUnitEntityByKey getStorageUnitStatusEntity getStatus getCode getStatus updateStorageUnitStatus getStatus createBusinessObjectDataKeyFromEntity getBusinessObjectData setBusinessObjectDataStorageUnitKey createBusinessObjectDataStorageUnitKey getName getStorage setStatus getCode getStatus setPreviousStatus
focal_method.modifiers: protected
focal_method.parameters: (
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_method.return: BusinessObjectDataStorageUnitStatusUpdateResponse
focal_method.signature: BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatusImpl(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)