@Test
public void testValidateRegisteredS3FilesActualFileNoExists() throws IOException
{

    // Create two lists of expected and actual storage files, with one expected file not being added to the list of actual files.
    List<StorageFile> testExpectedFiles = Collections.singletonList(new StorageFile(TARGET_S3_KEY, FILE_SIZE, ROW_COUNT_1000));
    List<S3ObjectSummary> testActualFiles = new ArrayList<>();
    // Try to validate S3 files when expected S3 file does not exist.
    try
    {
        storageFileHelper.validateRegisteredS3Files(testExpectedFiles, testActualFiles, STORAGE_NAME,
            new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                SUBPARTITION_VALUES, DATA_VERSION));
        fail("Should throw an ObjectNotFoundException when the registered S3 file does not exist.");
    }
    catch (ObjectNotFoundException e)
    {
        assertEquals(String.format("Registered file \"%s\" does not exist in \"%s\" storage.", TARGET_S3_KEY, STORAGE_NAME), e.getMessage());
    }
}