test_class.declarator: businessObjectDataDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataDaoHelper businessObjectDataDaoHelper;
test_class.type: BusinessObjectDataDaoHelper
test_class.var_name: businessObjectDataDaoHelper
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: businessObjectDataStorageUnitServiceImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private BusinessObjectDataStorageUnitServiceImpl businessObjectDataStorageUnitServiceImpl;
test_class.type: BusinessObjectDataStorageUnitServiceImpl
test_class.var_name: businessObjectDataStorageUnitServiceImpl
test_class.declarator: storageDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageDaoHelper storageDaoHelper;
test_class.type: StorageDaoHelper
test_class.var_name: storageDaoHelper
test_class.declarator: storageFileHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageFileHelper storageFileHelper;
test_class.type: StorageFileHelper
test_class.var_name: storageFileHelper
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: 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.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/BusinessObjectDataStorageUnitServiceImplTest.java
test_class.identifier: BusinessObjectDataStorageUnitServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testCreateBusinessObjectDataStorageUnit()
      {
          // 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 directory.
          StorageDirectory storageDirectory = new StorageDirectory(STORAGE_DIRECTORY_PATH);
  
          // Create a list of storage files.
          List<StorageFile> storageFiles =
              Arrays.asList(new StorageFile(FILE_NAME, FILE_SIZE, ROW_COUNT), new StorageFile(FILE_NAME_2, FILE_SIZE_2, ROW_COUNT_2));
  
          // Create a business object data storage unit request.
          BusinessObjectDataStorageUnitCreateRequest request =
              new BusinessObjectDataStorageUnitCreateRequest(businessObjectDataStorageUnitKey, storageDirectory, storageFiles, NO_DISCOVER_STORAGE_FILES);
  
          // Create a business object data entity.
          BusinessObjectDataEntity businessObjectDataEntity = new BusinessObjectDataEntity();
          businessObjectDataEntity.setId(ID);
  
          // Create a storage entity.
          StorageEntity storageEntity = new StorageEntity();
          storageEntity.setName(STORAGE_NAME);
  
          // Create a list of storage file entities.
          List<StorageFileEntity> storageFileEntities = Arrays.asList(new StorageFileEntity(), new StorageFileEntity());
  
          // Create a storage unit entity.
          StorageUnitEntity storageUnitEntity = new StorageUnitEntity();
          storageUnitEntity.setBusinessObjectData(businessObjectDataEntity);
          storageUnitEntity.setStorage(storageEntity);
          storageUnitEntity.setDirectoryPath(STORAGE_DIRECTORY_PATH);
          storageUnitEntity.setStorageFiles(storageFileEntities);
  
          // Create an expected business object data storage unit response.
          BusinessObjectDataStorageUnitCreateResponse expectedResponse =
              new BusinessObjectDataStorageUnitCreateResponse(businessObjectDataStorageUnitKey, storageDirectory, storageFiles);
  
          // Mock the external calls.
          when(storageUnitHelper.getBusinessObjectDataKey(businessObjectDataStorageUnitKey)).thenReturn(businessObjectDataKey);
          when(businessObjectDataDaoHelper.getBusinessObjectDataEntity(businessObjectDataKey)).thenReturn(businessObjectDataEntity);
          when(storageDaoHelper.getStorageEntity(STORAGE_NAME)).thenReturn(storageEntity);
          when(businessObjectDataDaoHelper
              .createStorageUnitEntity(businessObjectDataEntity, storageEntity, storageDirectory, storageFiles, NO_DISCOVER_STORAGE_FILES))
              .thenReturn(storageUnitEntity);
          when(businessObjectDataHelper.createBusinessObjectDataKeyFromEntity(businessObjectDataEntity)).thenReturn(businessObjectDataKey);
          when(storageUnitHelper.createBusinessObjectDataStorageUnitKey(businessObjectDataKey, STORAGE_NAME)).thenReturn(businessObjectDataStorageUnitKey);
          when(storageFileHelper.createStorageFilesFromEntities(storageFileEntities)).thenReturn(storageFiles);
  
          // Call the method under test.
          BusinessObjectDataStorageUnitCreateResponse result = businessObjectDataStorageUnitServiceImpl.createBusinessObjectDataStorageUnit(request);
  
          // Verify the external calls.
          verify(storageUnitHelper).validateBusinessObjectDataStorageUnitKey(businessObjectDataStorageUnitKey);
          verify(storageFileHelper).validateCreateRequestStorageFiles(storageFiles);
          verify(storageUnitHelper).getBusinessObjectDataKey(businessObjectDataStorageUnitKey);
          verify(businessObjectDataDaoHelper).getBusinessObjectDataEntity(businessObjectDataKey);
          verify(storageDaoHelper).getStorageEntity(STORAGE_NAME);
          verify(businessObjectDataDaoHelper)
              .createStorageUnitEntity(businessObjectDataEntity, storageEntity, storageDirectory, storageFiles, NO_DISCOVER_STORAGE_FILES);
          verify(businessObjectDataHelper).createBusinessObjectDataKeyFromEntity(businessObjectDataEntity);
          verify(storageUnitHelper).createBusinessObjectDataStorageUnitKey(businessObjectDataKey, STORAGE_NAME);
          verify(storageFileHelper).createStorageFilesFromEntities(storageFileEntities);
          verify(storageUnitDao).saveAndRefresh(storageUnitEntity);
          verifyNoMoreInteractionsHelper();
  
          // Validate the results.
          assertEquals(expectedResponse, result);
      }
test_case.class_method_signature: BusinessObjectDataStorageUnitServiceImplTest.testCreateBusinessObjectDataStorageUnit()
test_case.full_signature: @Test public void testCreateBusinessObjectDataStorageUnit()
test_case.identifier: testCreateBusinessObjectDataStorageUnit
test_case.invocations: asList setId setName asList setBusinessObjectData setStorage setDirectoryPath setStorageFiles thenReturn when getBusinessObjectDataKey thenReturn when getBusinessObjectDataEntity thenReturn when getStorageEntity thenReturn when createStorageUnitEntity thenReturn when createBusinessObjectDataKeyFromEntity thenReturn when createBusinessObjectDataStorageUnitKey thenReturn when createStorageFilesFromEntities createBusinessObjectDataStorageUnit validateBusinessObjectDataStorageUnitKey verify validateCreateRequestStorageFiles verify getBusinessObjectDataKey verify getBusinessObjectDataEntity verify getStorageEntity verify createStorageUnitEntity verify createBusinessObjectDataKeyFromEntity verify createBusinessObjectDataStorageUnitKey verify createStorageFilesFromEntities verify saveAndRefresh verify verifyNoMoreInteractionsHelper assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateBusinessObjectDataStorageUnit()
focal_class.declarator: businessObjectDataDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataDaoHelper businessObjectDataDaoHelper;
focal_class.type: BusinessObjectDataDaoHelper
focal_class.var_name: businessObjectDataDaoHelper
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: storageDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageDaoHelper storageDaoHelper;
focal_class.type: StorageDaoHelper
focal_class.var_name: storageDaoHelper
focal_class.declarator: storageFileHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageFileHelper storageFileHelper;
focal_class.type: StorageFileHelper
focal_class.var_name: storageFileHelper
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: 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.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/BusinessObjectDataStorageUnitServiceImpl.java
focal_class.identifier: BusinessObjectDataStorageUnitServiceImpl
focal_class.interfaces: implements BusinessObjectDataStorageUnitService
focal_class.class_method_signature: BusinessObjectDataStorageUnitServiceImpl.createBusinessObjectDataStorageUnit(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.full_signature: @PublishNotificationMessages @NamespacePermission(fields = "#request.businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnit(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.identifier: createBusinessObjectDataStorageUnit
focal_class.modifiers: @PublishNotificationMessages @NamespacePermission(fields = "#request.businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (BusinessObjectDataStorageUnitCreateRequest request)
focal_class.return: BusinessObjectDataStorageUnitCreateResponse
focal_class.signature: BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnit(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.class_method_signature: BusinessObjectDataStorageUnitServiceImpl.createBusinessObjectDataStorageUnitCreateResponse(StorageUnitEntity storageUnitEntity)
focal_class.full_signature: protected BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnitCreateResponse(StorageUnitEntity storageUnitEntity)
focal_class.identifier: createBusinessObjectDataStorageUnitCreateResponse
focal_class.modifiers: protected
focal_class.parameters: (StorageUnitEntity storageUnitEntity)
focal_class.return: BusinessObjectDataStorageUnitCreateResponse
focal_class.signature: BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnitCreateResponse(StorageUnitEntity storageUnitEntity)
focal_class.class_method_signature: BusinessObjectDataStorageUnitServiceImpl.createBusinessObjectDataStorageUnitImpl(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.full_signature: protected BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnitImpl(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.identifier: createBusinessObjectDataStorageUnitImpl
focal_class.modifiers: protected
focal_class.parameters: (BusinessObjectDataStorageUnitCreateRequest request)
focal_class.return: BusinessObjectDataStorageUnitCreateResponse
focal_class.signature: BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnitImpl(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.class_method_signature: BusinessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.full_signature: protected void validateBusinessObjectDataStorageUnitCreateRequest(BusinessObjectDataStorageUnitCreateRequest request)
focal_class.identifier: validateBusinessObjectDataStorageUnitCreateRequest
focal_class.modifiers: protected
focal_class.parameters: (BusinessObjectDataStorageUnitCreateRequest request)
focal_class.return: void
focal_class.signature: void validateBusinessObjectDataStorageUnitCreateRequest(BusinessObjectDataStorageUnitCreateRequest request)
focal_method.body: @PublishNotificationMessages
      @NamespacePermission(fields = "#request.businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE)
      @Override
      @Transactional(propagation = Propagation.REQUIRES_NEW)
      public BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnit(BusinessObjectDataStorageUnitCreateRequest request)
      {
          return createBusinessObjectDataStorageUnitImpl(request);
      }
focal_method.class_method_signature: BusinessObjectDataStorageUnitServiceImpl.createBusinessObjectDataStorageUnit(BusinessObjectDataStorageUnitCreateRequest request)
focal_method.full_signature: @PublishNotificationMessages @NamespacePermission(fields = "#request.businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnit(BusinessObjectDataStorageUnitCreateRequest request)
focal_method.identifier: createBusinessObjectDataStorageUnit
focal_method.invocations: createBusinessObjectDataStorageUnitImpl
focal_method.modifiers: @PublishNotificationMessages @NamespacePermission(fields = "#request.businessObjectDataStorageUnitKey.namespace", permissions = NamespacePermissionEnum.WRITE) @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_method.parameters: (BusinessObjectDataStorageUnitCreateRequest request)
focal_method.return: BusinessObjectDataStorageUnitCreateResponse
focal_method.signature: BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnit(BusinessObjectDataStorageUnitCreateRequest request)