@Test
public void testGetS3StorageUnitsToCleanup()
{

    // Create a storage unit entity.
    StorageUnitEntity storageUnitEntity = new StorageUnitEntity();
    // Create a list of storage unit entities.
    List<StorageUnitEntity> storageUnitEntities = Collections.singletonList(storageUnitEntity);
    // Create a storage unit key.
    BusinessObjectDataStorageUnitKey storageUnitKey =
        new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
            SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME);
    // Mock the external calls.
    when(mockStorageUnitDao.getS3StorageUnitsToCleanup(MAX_RESULT)).thenReturn(storageUnitEntities);
    when(mockStorageUnitHelper.createStorageUnitKeyFromEntity(storageUnitEntity)).thenReturn(storageUnitKey);
    // Call the method under test.
    List<BusinessObjectDataStorageUnitKey> result = cleanupDestroyedBusinessObjectDataService.getS3StorageUnitsToCleanup(MAX_RESULT);
    // Verify the external calls.
    verify(mockStorageUnitDao).getS3StorageUnitsToCleanup(MAX_RESULT);
    verify(mockStorageUnitHelper).createStorageUnitKeyFromEntity(storageUnitEntity);
    verifyNoMoreInteractionsHelper();
    // Validate the result.
    assertEquals(Collections.singletonList(storageUnitKey), result);
}