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 testUpdateBusinessObjectDataStorageUnitStatus()
      {
          // 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 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);
  
          // Create a storage unit entity.
          StorageUnitEntity storageUnitEntity = storageUnitDaoTestHelper.createStorageUnitEntity(businessObjectDataStorageUnitKey, STORAGE_UNIT_STATUS);
  
          // Create a storage unit status entity.
          StorageUnitStatusEntity storageUnitStatusEntity = storageUnitStatusDaoTestHelper.createStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2);
  
          // Create a business object data storage unit status update request.
          BusinessObjectDataStorageUnitStatusUpdateRequest request = new BusinessObjectDataStorageUnitStatusUpdateRequest(STORAGE_UNIT_STATUS_2);
  
          // Create a business object data storage unit status update response.
          BusinessObjectDataStorageUnitStatusUpdateResponse expectedResponse =
              new BusinessObjectDataStorageUnitStatusUpdateResponse(businessObjectDataStorageUnitKey, STORAGE_UNIT_STATUS_2, STORAGE_UNIT_STATUS);
  
          // Mock the external calls.
          when(storageUnitDaoHelper.getStorageUnitEntityByKey(businessObjectDataStorageUnitKey)).thenReturn(storageUnitEntity);
          when(storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2)).thenReturn(storageUnitStatusEntity);
          doAnswer(new Answer<Void>()
          {
              public Void answer(InvocationOnMock invocation)
              {
                  // Get the storage unit entity parameter.
                  StorageUnitEntity storageUnitEntity = (StorageUnitEntity) invocation.getArguments()[0];
                  StorageUnitStatusEntity storageUnitStatusEntity = (StorageUnitStatusEntity) invocation.getArguments()[1];
  
                  // Update storage unit status.
                  storageUnitEntity.setStatus(storageUnitStatusEntity);
                  return null;
              }
          }).when(storageUnitDaoHelper).updateStorageUnitStatus(storageUnitEntity, storageUnitStatusEntity, STORAGE_UNIT_STATUS_2);
          when(businessObjectDataHelper.createBusinessObjectDataKeyFromEntity(storageUnitEntity.getBusinessObjectData())).thenReturn(businessObjectDataKey);
          when(storageUnitHelper.createBusinessObjectDataStorageUnitKey(businessObjectDataKey, STORAGE_NAME)).thenReturn(businessObjectDataStorageUnitKey);
  
          // Call the method under test.
          BusinessObjectDataStorageUnitStatusUpdateResponse result =
              businessObjectDataStorageUnitStatusServiceImpl.updateBusinessObjectDataStorageUnitStatus(businessObjectDataStorageUnitKey, request);
  
          // Verify the external calls.
          verify(storageUnitHelper).validateBusinessObjectDataStorageUnitKey(businessObjectDataStorageUnitKey);
          verify(storageUnitDaoHelper).getStorageUnitEntityByKey(businessObjectDataStorageUnitKey);
          verify(storageUnitStatusDaoHelper).getStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2);
          verify(storageUnitDaoHelper).updateStorageUnitStatus(storageUnitEntity, storageUnitStatusEntity, STORAGE_UNIT_STATUS_2);
          verify(businessObjectDataHelper).createBusinessObjectDataKeyFromEntity(storageUnitEntity.getBusinessObjectData());
          verify(storageUnitHelper).createBusinessObjectDataStorageUnitKey(businessObjectDataKey, STORAGE_NAME);
          verifyNoMoreInteractionsHelper();
  
          // Validate the results.
          assertEquals(expectedResponse, result);
      }
test_case.class_method_signature: BusinessObjectDataStorageUnitStatusServiceImplTest.testUpdateBusinessObjectDataStorageUnitStatus()
test_case.full_signature: @Test public void testUpdateBusinessObjectDataStorageUnitStatus()
test_case.identifier: testUpdateBusinessObjectDataStorageUnitStatus
test_case.invocations: createStorageUnitEntity createStorageUnitStatusEntity thenReturn when getStorageUnitEntityByKey thenReturn when getStorageUnitStatusEntity updateStorageUnitStatus when doAnswer getArguments getArguments setStatus thenReturn when createBusinessObjectDataKeyFromEntity getBusinessObjectData thenReturn when createBusinessObjectDataStorageUnitKey updateBusinessObjectDataStorageUnitStatus validateBusinessObjectDataStorageUnitKey verify getStorageUnitEntityByKey verify getStorageUnitStatusEntity verify updateStorageUnitStatus verify createBusinessObjectDataKeyFromEntity verify getBusinessObjectData createBusinessObjectDataStorageUnitKey verify verifyNoMoreInteractionsHelper assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdateBusinessObjectDataStorageUnitStatus()
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: @PublishNotificationMessages
      @NamespacePermission(fields = "#businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE)
      @Override
      @Transactional(propagation = Propagation.REQUIRES_NEW)
      public BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatus(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
      {
          return updateBusinessObjectDataStorageUnitStatusImpl(businessObjectDataStorageUnitKey, request);
      }
focal_method.class_method_signature: BusinessObjectDataStorageUnitStatusServiceImpl.updateBusinessObjectDataStorageUnitStatus(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_method.full_signature: @PublishNotificationMessages @NamespacePermission(fields = "#businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatus(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_method.identifier: updateBusinessObjectDataStorageUnitStatus
focal_method.invocations: updateBusinessObjectDataStorageUnitStatusImpl
focal_method.modifiers: @PublishNotificationMessages @NamespacePermission(fields = "#businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_method.parameters: (
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)
focal_method.return: BusinessObjectDataStorageUnitStatusUpdateResponse
focal_method.signature: BusinessObjectDataStorageUnitStatusUpdateResponse updateBusinessObjectDataStorageUnitStatus(
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey, BusinessObjectDataStorageUnitStatusUpdateRequest request)