@Override
    public Path move(final Path file, final Path renamed, final TransferStatus status, final Delete.Callback callback, final ConnectionCallback connectionCallback) throws BackgroundException {
        if(new DefaultPathPredicate(containerService.getContainer(file)).test(containerService.getContainer(renamed))) {
            // Either copy complete file contents (small file) or copy manifest (large file)
            final Path rename = proxy.copy(file, renamed, new TransferStatus().withLength(file.attributes().getSize()), connectionCallback, new DisabledStreamListener());
            delete.delete(Collections.singletonMap(file, status), connectionCallback, callback, false);
            return rename;
        }
        else {
            final Path copy = new SwiftSegmentCopyService(session, regionService).copy(file, renamed, new TransferStatus().withLength(file.attributes().getSize()), connectionCallback, new DisabledStreamListener());
            delete.delete(Collections.singletonMap(file, status), connectionCallback, callback);
            return copy;
        }
    }
@Test
    public void testMoveLargeObjectToDifferentBucket() 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("DFW");
        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));
        assertThrows(BackgroundException.class, () -> new SwiftMoveFeature(session, regionService).move(sourceFile, targetFile,
                new TransferStatus(), new Delete.DisabledCallback(), new DisabledConnectionCallback()));
    }