@Override
    public List<MultipartUpload> find(final Path file) throws BackgroundException {
        if(log.isDebugEnabled()) {
            log.debug(String.format("Finding multipart uploads for %s", file));
        }
        final List<MultipartUpload> uploads = new ArrayList<>();
        // This operation lists in-progress multipart uploads. An in-progress multipart upload is a
        // multipart upload that has been initiated, using the Initiate Multipart Upload request, but has
        // not yet been completed or aborted.
        String nextUploadIdMarker = null;
        String nextKeyMarker = null;
        boolean isTruncated;
        do {
            final Path bucket = containerService.getContainer(file);
            final MultipartUploadChunk chunk;
            try {
                chunk = session.getClient().multipartListUploadsChunked(
                        bucket.isRoot() ? StringUtils.EMPTY : bucket.getName(), containerService.getKey(file),
                        String.valueOf(Path.DELIMITER), nextKeyMarker, nextUploadIdMarker, null, false);
            }
            catch(S3ServiceException e) {
                final BackgroundException failure = new S3ExceptionMappingService().map("Upload {0} failed", e, file);
                if(failure instanceof NotfoundException) {
                    return Collections.emptyList();
                }
                if(failure instanceof InteroperabilityException) {
                    return Collections.emptyList();
                }
                throw failure;
            }
            uploads.addAll(Arrays.asList(chunk.getUploads()));
            if(log.isInfoEnabled()) {
                log.info(String.format("Found %d previous multipart uploads for %s", uploads.size(), file));
            }
            // Sort with newest upload first in list
            uploads.sort(new Comparator<MultipartUpload>() {
                @Override
                public int compare(final MultipartUpload o1, final MultipartUpload o2) {
                    return -o1.getInitiatedDate().compareTo(o2.getInitiatedDate());
                }
            });
            nextKeyMarker = chunk.getPriorLastKey();
            nextUploadIdMarker = chunk.getPriorLastIdMarker();
            isTruncated = !chunk.isListingComplete();
        }
        while(isTruncated && nextUploadIdMarker != null);
        if(log.isInfoEnabled()) {
            for(MultipartUpload upload : uploads) {
                log.info(String.format("Found multipart upload %s for %s", upload, file));
            }
        }
        return uploads;
    }
@Test
    public void testFindKeyWithSpace() throws Exception {
        final Path container = new Path("test-eu-central-1-cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final Path test = new Path(container, "t f", EnumSet.of(Path.Type.file));
        final List<MultipartUpload> list = new S3DefaultMultipartService(session).find(test);
        assertTrue(list.isEmpty());
    }