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 testCreateBusinessObjectDataStorageUnitCreateResponseDirectoryOnlyRegistration()
      {
          // 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);
          storageUnitEntity.setDirectoryPath(STORAGE_DIRECTORY_PATH);
  
          // Create an expected business object data storage unit response.
          BusinessObjectDataStorageUnitCreateResponse expectedResponse =
              new BusinessObjectDataStorageUnitCreateResponse(businessObjectDataStorageUnitKey, new StorageDirectory(STORAGE_DIRECTORY_PATH), null);
  
          // Mock the external calls.
          when(businessObjectDataHelper.createBusinessObjectDataKeyFromEntity(storageUnitEntity.getBusinessObjectData())).thenReturn(businessObjectDataKey);
          when(storageUnitHelper.createBusinessObjectDataStorageUnitKey(businessObjectDataKey, STORAGE_NAME)).thenReturn(businessObjectDataStorageUnitKey);
  
          // Call the method under test.
          BusinessObjectDataStorageUnitCreateResponse result =
              businessObjectDataStorageUnitServiceImpl.createBusinessObjectDataStorageUnitCreateResponse(storageUnitEntity);
  
          // Verify the external calls.
          verify(businessObjectDataHelper).createBusinessObjectDataKeyFromEntity(storageUnitEntity.getBusinessObjectData());
          verify(storageUnitHelper).createBusinessObjectDataStorageUnitKey(businessObjectDataKey, STORAGE_NAME);
          verifyNoMoreInteractionsHelper();
  
          // Validate the results.
          assertEquals(expectedResponse, result);
      }
test_case.class_method_signature: BusinessObjectDataStorageUnitServiceImplTest.testCreateBusinessObjectDataStorageUnitCreateResponseDirectoryOnlyRegistration()
test_case.full_signature: @Test public void testCreateBusinessObjectDataStorageUnitCreateResponseDirectoryOnlyRegistration()
test_case.identifier: testCreateBusinessObjectDataStorageUnitCreateResponseDirectoryOnlyRegistration
test_case.invocations: createStorageUnitEntity setDirectoryPath thenReturn when createBusinessObjectDataKeyFromEntity getBusinessObjectData thenReturn when createBusinessObjectDataStorageUnitKey createBusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataKeyFromEntity verify getBusinessObjectData createBusinessObjectDataStorageUnitKey verify verifyNoMoreInteractionsHelper assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateBusinessObjectDataStorageUnitCreateResponseDirectoryOnlyRegistration()
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: protected BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnitCreateResponse(StorageUnitEntity storageUnitEntity)
      {
          // Get business object data key from the business object data entity.
          BusinessObjectDataKey businessObjectDataKey = businessObjectDataHelper.createBusinessObjectDataKeyFromEntity(storageUnitEntity.getBusinessObjectData());
  
          // Create a business object data storage unit create response.
          BusinessObjectDataStorageUnitCreateResponse response = new BusinessObjectDataStorageUnitCreateResponse();
  
          // Add business object data storage unit key.
          response.setBusinessObjectDataStorageUnitKey(
              storageUnitHelper.createBusinessObjectDataStorageUnitKey(businessObjectDataKey, storageUnitEntity.getStorage().getName()));
  
          // Add storage directory.
          if (storageUnitEntity.getDirectoryPath() != null)
          {
              response.setStorageDirectory(new StorageDirectory(storageUnitEntity.getDirectoryPath()));
          }
  
          // Add storage files.
          if (CollectionUtils.isNotEmpty(storageUnitEntity.getStorageFiles()))
          {
              response.setStorageFiles(storageFileHelper.createStorageFilesFromEntities(storageUnitEntity.getStorageFiles()));
          }
  
          // Return the response.
          return response;
      }
focal_method.class_method_signature: BusinessObjectDataStorageUnitServiceImpl.createBusinessObjectDataStorageUnitCreateResponse(StorageUnitEntity storageUnitEntity)
focal_method.full_signature: protected BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnitCreateResponse(StorageUnitEntity storageUnitEntity)
focal_method.identifier: createBusinessObjectDataStorageUnitCreateResponse
focal_method.invocations: createBusinessObjectDataKeyFromEntity getBusinessObjectData setBusinessObjectDataStorageUnitKey createBusinessObjectDataStorageUnitKey getName getStorage getDirectoryPath setStorageDirectory getDirectoryPath isNotEmpty getStorageFiles setStorageFiles createStorageFilesFromEntities getStorageFiles
focal_method.modifiers: protected
focal_method.parameters: (StorageUnitEntity storageUnitEntity)
focal_method.return: BusinessObjectDataStorageUnitCreateResponse
focal_method.signature: BusinessObjectDataStorageUnitCreateResponse createBusinessObjectDataStorageUnitCreateResponse(StorageUnitEntity storageUnitEntity)