test_class.declarator: argumentCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<List<StorageFileEntity>> argumentCaptor;
test_class.type: ArgumentCaptor<List<StorageFileEntity>>
test_class.var_name: argumentCaptor
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: storageFileDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageFileDao storageFileDao;
test_class.type: StorageFileDao
test_class.var_name: storageFileDao
test_class.declarator: storageFileDaoHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private StorageFileDaoHelper storageFileDaoHelper;
test_class.type: StorageFileDaoHelper
test_class.var_name: storageFileDaoHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/StorageFileDaoHelperTest.java
test_class.identifier: StorageFileDaoHelperTest
test_case.body: @Test
      public void testGetStorageFileEntityByStorageUnitEntityAndFilePathWithNullStorageFileEntity()
      {
          // Create a new business object data key
          BusinessObjectDataKey businessObjectDataKey =
              new BusinessObjectDataKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES,
                  DATA_VERSION);
  
          // Create a storage unit entity.
          StorageEntity storageEntity = new StorageEntity();
          storageEntity.setName(STORAGE_NAME);
          StorageUnitEntity storageUnitEntity = new StorageUnitEntity();
          storageUnitEntity.setStorage(storageEntity);
          storageUnitEntity.setDirectoryPath(DIRECTORY_PATH);
  
          // Create a file path.
          String filePath = TEST_S3_KEY_PREFIX + "/" + LOCAL_FILE;
  
          // Mock the external calls.
          when(storageFileDao.getStorageFileByStorageUnitEntityAndFilePath(storageUnitEntity, filePath)).thenReturn(null);
  
          try
          {
              // Call the method under test.
              storageFileDaoHelper.getStorageFileEntity(storageUnitEntity, filePath, businessObjectDataKey);
              fail();
          }
          catch (ObjectNotFoundException objectNotFoundException)
          {
              // Validate the exception message.
              assertThat("Exception message not equal to expected exception message.", objectNotFoundException.getMessage(), is(String
                  .format("Storage file \"%s\" doesn't exist in \"%s\" storage. Business object data: {%s}", filePath, storageUnitEntity.getStorage().getName(),
                      businessObjectDataHelper.businessObjectDataKeyToString(businessObjectDataKey))));
          }
  
          // Verify the external calls.
          verify(storageFileDao).getStorageFileByStorageUnitEntityAndFilePath(storageUnitEntity, filePath);
          verify(businessObjectDataHelper, times(2)).businessObjectDataKeyToString(businessObjectDataKey);
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: StorageFileDaoHelperTest.testGetStorageFileEntityByStorageUnitEntityAndFilePathWithNullStorageFileEntity()
test_case.full_signature: @Test public void testGetStorageFileEntityByStorageUnitEntityAndFilePathWithNullStorageFileEntity()
test_case.identifier: testGetStorageFileEntityByStorageUnitEntityAndFilePathWithNullStorageFileEntity
test_case.invocations: setName setStorage setDirectoryPath thenReturn when getStorageFileByStorageUnitEntityAndFilePath getStorageFileEntity fail assertThat getMessage is format getName getStorage businessObjectDataKeyToString getStorageFileByStorageUnitEntityAndFilePath verify businessObjectDataKeyToString verify times verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetStorageFileEntityByStorageUnitEntityAndFilePathWithNullStorageFileEntity()
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: storageFileDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageFileDao storageFileDao;
focal_class.type: StorageFileDao
focal_class.var_name: storageFileDao
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/StorageFileDaoHelper.java
focal_class.identifier: StorageFileDaoHelper
focal_class.class_method_signature: StorageFileDaoHelper.createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
focal_class.full_signature: public List<StorageFileEntity> createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
focal_class.identifier: createStorageFileEntitiesFromStorageFiles
focal_class.modifiers: public
focal_class.parameters: (StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
focal_class.return: List<StorageFileEntity>
focal_class.signature: List<StorageFileEntity> createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
focal_class.class_method_signature: StorageFileDaoHelper.getStorageFileEntity(String storageName, String filePath)
focal_class.full_signature: public StorageFileEntity getStorageFileEntity(String storageName, String filePath)
focal_class.identifier: getStorageFileEntity
focal_class.modifiers: public
focal_class.parameters: (String storageName, String filePath)
focal_class.return: StorageFileEntity
focal_class.signature: StorageFileEntity getStorageFileEntity(String storageName, String filePath)
focal_class.class_method_signature: StorageFileDaoHelper.getStorageFileEntity(StorageUnitEntity storageUnitEntity, String filePath, BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: public StorageFileEntity getStorageFileEntity(StorageUnitEntity storageUnitEntity, String filePath, BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: getStorageFileEntity
focal_class.modifiers: public
focal_class.parameters: (StorageUnitEntity storageUnitEntity, String filePath, BusinessObjectDataKey businessObjectDataKey)
focal_class.return: StorageFileEntity
focal_class.signature: StorageFileEntity getStorageFileEntity(StorageUnitEntity storageUnitEntity, String filePath, BusinessObjectDataKey businessObjectDataKey)
focal_method.body: public StorageFileEntity getStorageFileEntity(String storageName, String filePath) throws ObjectNotFoundException, IllegalArgumentException
      {
          StorageFileEntity storageFileEntity = storageFileDao.getStorageFileByStorageNameAndFilePath(storageName, filePath);
  
          if (storageFileEntity == null)
          {
              throw new ObjectNotFoundException(String.format("Storage file \"%s\" doesn't exist in \"%s\" storage.", filePath, storageName));
          }
  
          return storageFileEntity;
      }
focal_method.class_method_signature: StorageFileDaoHelper.getStorageFileEntity(String storageName, String filePath)
focal_method.full_signature: public StorageFileEntity getStorageFileEntity(String storageName, String filePath)
focal_method.identifier: getStorageFileEntity
focal_method.invocations: getStorageFileByStorageNameAndFilePath format
focal_method.modifiers: public
focal_method.parameters: (String storageName, String filePath)
focal_method.return: StorageFileEntity
focal_method.signature: StorageFileEntity getStorageFileEntity(String storageName, String filePath)