@Override
    public Path copy(final Path source, final Path target, final ch.cyberduck.core.transfer.TransferStatus status, final ConnectionCallback callback, final StreamListener listener) throws BackgroundException {
        try {
            final IRODSFileSystemAO fs = session.getClient();
            final DataTransferOperations transfer = fs.getIRODSAccessObjectFactory()
                .getDataTransferOperations(fs.getIRODSAccount());
            transfer.copy(fs.getIRODSFileFactory().instanceIRODSFile(source.getAbsolute()),
                fs.getIRODSFileFactory().instanceIRODSFile(target.getAbsolute()), new TransferStatusCallbackListener() {
                    @Override
                    public FileStatusCallbackResponse statusCallback(final TransferStatus transferStatus) {
                        return FileStatusCallbackResponse.CONTINUE;
                    }

                    @Override
                    public void overallStatusCallback(final TransferStatus transferStatus) {
                        switch(transferStatus.getTransferState()) {
                            case OVERALL_COMPLETION:
                                listener.sent(status.getLength());
                        }
                    }

                    @Override
                    public CallbackResponse transferAsksWhetherToForceOperation(final String irodsAbsolutePath, final boolean isCollection) {
                        return CallbackResponse.YES_THIS_FILE;
                    }
                }, DefaultTransferControlBlock.instance(StringUtils.EMPTY,
                    new HostPreferences(session.getHost()).getInteger("connection.retry")));
            return target;
        }
        catch(JargonException e) {
            throw new IRODSExceptionMappingService().map("Cannot copy {0}", e, source);
        }
    }
@Test
    public void testCopy() throws Exception {
        final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new IRODSProtocol())));
        final Profile profile = new ProfilePlistReader(factory).read(
                this.getClass().getResourceAsStream("/iRODS (iPlant Collaborative).cyberduckprofile"));
        final Host host = new Host(profile, profile.getDefaultHostname(), new Credentials(
                PROPERTIES.get("irods.key"), PROPERTIES.get("irods.secret")
        ));

        final IRODSSession session = new IRODSSession(host);
        session.open(new DisabledProxyFinder(), new DisabledHostKeyCallback(), new DisabledLoginCallback(), new DisabledCancelCallback());
        session.login(new DisabledLoginCallback(), new DisabledCancelCallback());
        final Path test = new Path(new IRODSHomeFinderService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
        new IRODSTouchFeature(session).touch(test, new TransferStatus());
        final Path copy = new Path(new IRODSHomeFinderService(session).find(), UUID.randomUUID().toString(), EnumSet.of(Path.Type.file));
        new IRODSCopyFeature(session).copy(test, copy, new TransferStatus(), new DisabledConnectionCallback(), new DisabledStreamListener());
        assertTrue(new IRODSFindFeature(session).find(test));
        assertTrue(new IRODSFindFeature(session).find(copy));
        new IRODSDeleteFeature(session).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
        session.close();
    }