StorageUnitHelper { public List<Integer> getStorageUnitIds(List<StorageUnitAvailabilityDto> storageUnitAvailabilityDtos) { List<Integer> storageUnitIds = new ArrayList<>(storageUnitAvailabilityDtos.size()); for (StorageUnitAvailabilityDto storageUnitAvailabilityDto : storageUnitAvailabilityDtos) { storageUnitIds.add(storageUnitAvailabilityDto.getStorageUnitId()); } return storageUnitIds; }  BusinessObjectDataStorageUnitKey createBusinessObjectDataStorageUnitKey(BusinessObjectDataKey businessObjectDataKey, String storageName); BusinessObjectDataStorageUnitKey createStorageUnitKey(BusinessObjectDataKey businessObjectDataKey, String storageName); BusinessObjectDataStorageUnitKey createStorageUnitKeyFromEntity(StorageUnitEntity storageUnitEntity); List<StorageUnitAvailabilityDto> excludeBusinessObjectDataStatus(List<StorageUnitAvailabilityDto> storageUnitAvailabilityDtos,
        String excludedBusinessObjectDataStatus); List<StorageUnitAvailabilityDto> excludePartitions(List<StorageUnitAvailabilityDto> storageUnitAvailabilityDtos,
        List<List<String>> excludedPartitions); BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey); List<Integer> getStorageUnitIds(List<StorageUnitAvailabilityDto> storageUnitAvailabilityDtos); void validateBusinessObjectDataStorageUnitKey(BusinessObjectDataStorageUnitKey key);  }
@Test public void testGetStorageUnitIds() { StorageUnitAvailabilityDto storageUnitAvailabilityDto1 = new StorageUnitAvailabilityDto(); storageUnitAvailabilityDto1.setStorageUnitId(INTEGER_VALUE); StorageUnitAvailabilityDto storageUnitAvailabilityDto2 = new StorageUnitAvailabilityDto(); storageUnitAvailabilityDto2.setStorageUnitId(INTEGER_VALUE_2); List<Integer> result = storageUnitHelper.getStorageUnitIds(Arrays.asList(storageUnitAvailabilityDto1, storageUnitAvailabilityDto2)); assertEquals(Arrays.asList(INTEGER_VALUE, INTEGER_VALUE_2), result); result = storageUnitHelper.getStorageUnitIds(new ArrayList<>()); assertNotNull(result); assertEquals(0, result.size()); }