### Question:
DataStorageLoader extends AbstractCloudPipelineEntityLoader<DataStorageDoc> { @Override protected String getOwner(final DataStorageDoc entity) { return entity.getStorage().getOwner(); } DataStorageLoader(final CloudPipelineAPIClient apiClient);   }### Answer:
@Test void shouldLoadDataStorageTest() throws EntityNotFoundException { StoragePolicy policy = new StoragePolicy(); policy.setBackupDuration(DURATION); policy.setLongTermStorageDuration(DURATION); policy.setShortTermStorageDuration(DURATION); S3bucketDataStorage expectedDataStorage = new S3bucketDataStorage(); expectedDataStorage.setId(1L); expectedDataStorage.setParentFolderId(1L); expectedDataStorage.setName(TEST_NAME); expectedDataStorage.setPath(TEST_PATH); expectedDataStorage.setOwner(TEST_NAME); expectedDataStorage.setStoragePolicy(policy); DataStorageLoader dataStorageLoader = new DataStorageLoader(apiClient); when(apiClient.loadDataStorage(anyLong())).thenReturn(expectedDataStorage); Optional<EntityContainer<DataStorageDoc>> container = dataStorageLoader.loadEntity(1L); EntityContainer<DataStorageDoc> storageDocEntityContainer = container.orElseThrow(AssertionError::new); DataStorageDoc actualDataStorageDoc = storageDocEntityContainer.getEntity(); assertNotNull(actualDataStorageDoc); AbstractDataStorage actualDataStorage = actualDataStorageDoc.getStorage(); verifyDataStorage(expectedDataStorage, actualDataStorage); verifyPipelineUser(storageDocEntityContainer.getOwner()); verifyPermissions(PERMISSIONS_CONTAINER_WITH_OWNER, storageDocEntityContainer.getPermissions()); verifyMetadata(EXPECTED_METADATA, new ArrayList<>(storageDocEntityContainer.getMetadata().values())); }