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 testCreateStorageFileEntitiesFromStorageFiles()
      {
          // Create a storage unit entity.
          StorageUnitEntity storageUnitEntity = new StorageUnitEntity();
  
          // Create a list of storage files
          List<StorageFile> storageFiles =
              Lists.newArrayList(new StorageFile(FILE_NAME, FILE_SIZE, ROW_COUNT), new StorageFile(FILE_NAME_2, FILE_SIZE_2, ROW_COUNT_2));
  
          // Call the method under test.
          List<StorageFileEntity> result = storageFileDaoHelper.createStorageFileEntitiesFromStorageFiles(storageUnitEntity, storageFiles);
  
          // Validate the results.
          assertThat("Result size not equal to two.", result.size(), is(2));
          assertThat("File size not equal.", result.get(0).getFileSizeBytes(), is(FILE_SIZE));
          assertThat("Row count not equal.", result.get(0).getRowCount(), is(ROW_COUNT));
          assertThat("File size not equal.", result.get(1).getFileSizeBytes(), is(FILE_SIZE_2));
          assertThat("Row count not equal.", result.get(1).getRowCount(), is(ROW_COUNT_2));
  
          // Verify the external calls.
          verify(storageFileDao).saveStorageFiles(argumentCaptor.capture());
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: StorageFileDaoHelperTest.testCreateStorageFileEntitiesFromStorageFiles()
test_case.full_signature: @Test public void testCreateStorageFileEntitiesFromStorageFiles()
test_case.identifier: testCreateStorageFileEntitiesFromStorageFiles
test_case.invocations: newArrayList createStorageFileEntitiesFromStorageFiles assertThat size is assertThat getFileSizeBytes get is assertThat getRowCount get is assertThat getFileSizeBytes get is assertThat getRowCount get is saveStorageFiles verify capture verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateStorageFileEntitiesFromStorageFiles()
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 List<StorageFileEntity> createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
      {
          List<StorageFileEntity> storageFileEntities = new ArrayList<>();
  
          for (StorageFile storageFile : storageFiles)
          {
              StorageFileEntity storageFileEntity = new StorageFileEntity();
              storageFileEntities.add(storageFileEntity);
              storageFileEntity.setStorageUnit(storageUnitEntity);
              storageFileEntity.setPath(storageFile.getFilePath());
              storageFileEntity.setFileSizeBytes(storageFile.getFileSizeBytes());
              storageFileEntity.setRowCount(storageFile.getRowCount());
          }
  
          storageFileDao.saveStorageFiles(storageFileEntities);
  
          return storageFileEntities;
      }
focal_method.class_method_signature: StorageFileDaoHelper.createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
focal_method.full_signature: public List<StorageFileEntity> createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
focal_method.identifier: createStorageFileEntitiesFromStorageFiles
focal_method.invocations: add setStorageUnit setPath getFilePath setFileSizeBytes getFileSizeBytes setRowCount getRowCount saveStorageFiles
focal_method.modifiers: public
focal_method.parameters: (StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)
focal_method.return: List<StorageFileEntity>
focal_method.signature: List<StorageFileEntity> createStorageFileEntitiesFromStorageFiles(StorageUnitEntity storageUnitEntity, List<StorageFile> storageFiles)