class GoogleStorageCopyFeature implements Copy {

    @Override
    public Path copy(final Path source, final Path target, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {
        try {
            final StorageObject object = session.getClient().objects().copy(containerService.getContainer(source).getName(), containerService.getKey(source),
                containerService.getContainer(target).getName(), containerService.getKey(target),
                session.getClient().objects().get(
                    containerService.getContainer(source).getName(), containerService.getKey(source)).execute()).execute();
            return new Path(target.getParent(), target.getName(), target.getType(),
                new GoogleStorageAttributesFinderFeature(session).toAttributes(object));
        }
        catch(IOException e) {
            throw new GoogleStorageExceptionMappingService().map("Cannot copy {0}", e, source);
        }
    }

    public  GoogleStorageCopyFeature(final GoogleStorageSession session);

}