@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();
}