@Override
    public DescriptiveUrl toDownloadUrl(final Path file, final Sharee sharee, final Object options, final PasswordCallback callback) throws BackgroundException {
        try {
            final Credentials password = callback.prompt(session.getHost(),
                    LocaleFactory.localizedString("Passphrase", "Cryptomator"),
                    MessageFormat.format(LocaleFactory.localizedString("Create a passphrase required to access {0}", "Credentials"), file.getName()),
                    new LoginOptions().anonymous(true).keychain(false).icon(session.getHost().getProtocol().disk()));
            return new DescriptiveUrl(URI.create(new BundlesApi(new BrickApiClient(session))
                    .postBundles(new BundlesBody().password(password.isPasswordAuthentication() ? password.getPassword() : null).paths(Collections.singletonList(
                            StringUtils.removeStart(file.getAbsolute(), String.valueOf(Path.DELIMITER))))).getUrl()), DescriptiveUrl.Type.signed);
        }
        catch(ApiException e) {
            throw new BrickExceptionMappingService().map(e);
        }
    }
@Test
    public void toDownloadUrl() throws Exception {
        final Path directory = new BrickDirectoryFeature(session).mkdir(new Path(new AlphanumericRandomStringService().random(),
            EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
        final Path test = new BrickTouchFeature(session).touch(
            new Path(directory, String.format("%s", new AlphanumericRandomStringService().random()), EnumSet.of(Path.Type.file)), new TransferStatus());
        assertNotNull(new BrickShareFeature(session).toDownloadUrl(test, Share.Sharee.world, null, new DisabledPasswordCallback()).getUrl());
        new BrickDeleteFeature(session).delete(Collections.singletonList(directory), new DisabledPasswordCallback(), new Delete.DisabledCallback());
    }