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 testValidateBusinessObjectDataStorageUnitCreateRequestDirectoryOnlyRegistration()
      {
          // 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);
  
          // Call the method under test.
          businessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(
              new BusinessObjectDataStorageUnitCreateRequest(businessObjectDataStorageUnitKey, new StorageDirectory(STORAGE_DIRECTORY_PATH), NO_STORAGE_FILES,
                  DISCOVER_STORAGE_FILES));
  
          // Verify the external calls.
          verify(storageUnitHelper).validateBusinessObjectDataStorageUnitKey(businessObjectDataStorageUnitKey);
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: BusinessObjectDataStorageUnitServiceImplTest.testValidateBusinessObjectDataStorageUnitCreateRequestDirectoryOnlyRegistration()
test_case.full_signature: @Test public void testValidateBusinessObjectDataStorageUnitCreateRequestDirectoryOnlyRegistration()
test_case.identifier: testValidateBusinessObjectDataStorageUnitCreateRequestDirectoryOnlyRegistration
test_case.invocations: validateBusinessObjectDataStorageUnitCreateRequest validateBusinessObjectDataStorageUnitKey verify verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidateBusinessObjectDataStorageUnitCreateRequestDirectoryOnlyRegistration()
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 void validateBusinessObjectDataStorageUnitCreateRequest(BusinessObjectDataStorageUnitCreateRequest request)
      {
          Assert.notNull(request, "A business object data storage unit create request must be specified.");
  
          storageUnitHelper.validateBusinessObjectDataStorageUnitKey(request.getBusinessObjectDataStorageUnitKey());
  
          if (BooleanUtils.isTrue(request.isDiscoverStorageFiles()))
          {
              // The auto-discovery of storage files is enabled, thus a storage directory is required and storage files cannot be specified.
              Assert.isTrue(request.getStorageDirectory() != null, "A storage directory must be specified when discovery of storage files is enabled.");
              Assert.isTrue(CollectionUtils.isEmpty(request.getStorageFiles()), "Storage files cannot be specified when discovery of storage files is enabled.");
          }
          else
          {
              // Since auto-discovery is disabled, a storage directory or at least one storage file are required for each storage unit.
              Assert.isTrue(request.getStorageDirectory() != null || CollectionUtils.isNotEmpty(request.getStorageFiles()),
                  "A storage directory or at least one storage file must be specified when discovery of storage files is not enabled.");
          }
  
          // If storageDirectory element is present in the request, we require it to contain a non-empty directoryPath element.
          if (request.getStorageDirectory() != null)
          {
              Assert.hasText(request.getStorageDirectory().getDirectoryPath(), "A storage directory path must be specified.");
              request.getStorageDirectory().setDirectoryPath(request.getStorageDirectory().getDirectoryPath().trim());
          }
  
          // Validate a list of storage files, if specified.
          if (CollectionUtils.isNotEmpty(request.getStorageFiles()))
          {
              storageFileHelper.validateCreateRequestStorageFiles(request.getStorageFiles());
          }
      }
focal_method.class_method_signature: BusinessObjectDataStorageUnitServiceImpl.validateBusinessObjectDataStorageUnitCreateRequest(BusinessObjectDataStorageUnitCreateRequest request)
focal_method.full_signature: protected void validateBusinessObjectDataStorageUnitCreateRequest(BusinessObjectDataStorageUnitCreateRequest request)
focal_method.identifier: validateBusinessObjectDataStorageUnitCreateRequest
focal_method.invocations: notNull validateBusinessObjectDataStorageUnitKey getBusinessObjectDataStorageUnitKey isTrue isDiscoverStorageFiles isTrue getStorageDirectory isTrue isEmpty getStorageFiles isTrue getStorageDirectory isNotEmpty getStorageFiles getStorageDirectory hasText getDirectoryPath getStorageDirectory setDirectoryPath getStorageDirectory trim getDirectoryPath getStorageDirectory isNotEmpty getStorageFiles validateCreateRequestStorageFiles getStorageFiles
focal_method.modifiers: protected
focal_method.parameters: (BusinessObjectDataStorageUnitCreateRequest request)
focal_method.return: void
focal_method.signature: void validateBusinessObjectDataStorageUnitCreateRequest(BusinessObjectDataStorageUnitCreateRequest request)