@Override
    public DescriptiveUrl toDownloadUrl(final Path file, final Sharee sharee, final Void options, final PasswordCallback callback) throws BackgroundException {
        final Acl permission = acl.getPermission(file);
        final Acl.GroupUser everyone = new Acl.GroupUser(Acl.GroupUser.EVERYONE);
        final Acl.Role read = new Acl.Role(Permission.PERMISSION_READ.toString());
        if(!permission.asList().contains(new Acl.UserAndRole(everyone, read))) {
            permission.addAll(everyone, read);
            acl.setPermission(file, permission);
        }
        return new DefaultUrlProvider(session.getHost()).toUrl(file).find(DescriptiveUrl.Type.provider);
    }
@Test
    public void toDownloadUrl() throws Exception {
        final Path bucket = new Path("test-eu-central-1-cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final Path test = new Path(bucket, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
        new S3TouchFeature(session, new S3AccessControlListFeature(session)).touch(test, new TransferStatus());
        final S3PublicUrlProvider provider = new S3PublicUrlProvider(session, new S3AccessControlListFeature(session));
        assertFalse(provider.isSupported(bucket, Share.Type.download));
        assertTrue(provider.isSupported(test, Share.Type.download));
        final DescriptiveUrl url = provider.toDownloadUrl(test, Share.Sharee.world, null, new DisabledPasswordCallback());
        assertNotEquals(DescriptiveUrl.EMPTY, url);
        assertNotNull(url.getUrl());
        new S3DefaultDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }