@Override
    public Path copy(final Path source, final Path target, final TransferStatus status, final ConnectionCallback callback, final StreamListener listener) throws BackgroundException {
        return copy(source, segmentService.list(source), target, status, callback, listener);
    }
@Test
    public void testCopyManifestDifferentBucket() throws Exception {
        final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume));
        container.attributes().setRegion("IAD");
        final Path originFolder = new Path(container, UUID.randomUUID().toString(), EnumSet.of(Path.Type.directory));
        final Path sourceFile = new Path(originFolder, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));

        final SwiftRegionService regionService = new SwiftRegionService(session);
        final SwiftSegmentService segmentService = new SwiftSegmentService(session, ".segments-test/");
        prepareFile(sourceFile, regionService, segmentService);

        final SwiftFindFeature findFeature = new SwiftFindFeature(session);
        assertTrue(findFeature.find(sourceFile));

        final List<Path> sourceSegments = segmentService.list(sourceFile);

        final Path targetBucket = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume));
        targetBucket.attributes().setRegion("IAD");
        final Path targetFolder = new Path(targetBucket, UUID.randomUUID().toString(), EnumSet.of(Path.Type.directory));
        final Path targetFile = new Path(targetFolder, UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
        final Path copiedFile = new SwiftDefaultCopyFeature(session, regionService)
            .copy(sourceFile, targetFile, new TransferStatus(), new DisabledConnectionCallback(), new DisabledStreamListener());
        // copied file exists
        assertTrue(findFeature.find(copiedFile));

        final List<Path> targetSegments = segmentService.list(targetFile);

        assertTrue(sourceSegments.containsAll(targetSegments) && targetSegments.containsAll(sourceSegments));

        // delete source, without deleting segments
        new SwiftDeleteFeature(session, segmentService, regionService).delete(
            Collections.singletonMap(sourceFile, new TransferStatus()),
            new DisabledPasswordCallback(), new Delete.DisabledCallback(), false);
        assertFalse(findFeature.find(sourceFile));

        assertTrue(targetSegments.stream().allMatch(p -> {
            try {
                return findFeature.find(p);
            }
            catch(BackgroundException e) {
                return false;
            }
        }));

        new SwiftDeleteFeature(session, segmentService, regionService).delete(
            Collections.singletonMap(copiedFile, new TransferStatus()),
            new DisabledPasswordCallback(), new Delete.DisabledCallback(), true);
        assertFalse(findFeature.find(copiedFile));
    }