@Override
    public DescriptiveUrlBag toUrl(final Path file) {
        final DescriptiveUrlBag list = new DefaultUrlProvider(session.getHost()).toUrl(file);
        if(file.isFile()) {
            // Authenticated browser download using cookie-based Google account authentication in conjunction with ACL
            list.add(new DescriptiveUrl(URI.create(String.format("https://storage.cloud.google.com%s",
                URIEncoder.encode(file.getAbsolute()))), DescriptiveUrl.Type.authenticated,
                MessageFormat.format(LocaleFactory.localizedString("{0} URL"), LocaleFactory.localizedString("Authenticated"))));
            // Website configuration
            final Distribution distribution = new Distribution(Distribution.DOWNLOAD, URI.create(String.format("%s://%s.%s",
                Distribution.DOWNLOAD.getScheme(), containerService.getContainer(file).getName(), session.getHost().getProtocol().getDefaultHostname())),
                false);
            distribution.setUrl(URI.create(String.format("%s://%s.%s", Distribution.DOWNLOAD.getScheme(), containerService.getContainer(file).getName(),
                session.getHost().getProtocol().getDefaultHostname())));
            list.addAll(new DistributionUrlProvider(distribution).toUrl(file));
        }
        // gsutil URI
        list.add(new DescriptiveUrl(URI.create(String.format("gs://%s%s",
            containerService.getContainer(file).getName(),
            file.isRoot() ? Path.DELIMITER : containerService.isContainer(file) ? Path.DELIMITER : String.format("/%s", URIEncoder.encode(containerService.getKey(file))))),
            DescriptiveUrl.Type.provider,
            MessageFormat.format(LocaleFactory.localizedString("{0} URL"), session.getHost().getProtocol().getName())));
        return list;
    }
@Test
    public void testGet() {
        assertEquals("https://storage.cloud.google.com/c/f", new GoogleStorageUrlProvider(session).toUrl(
            new Path("/c/f", EnumSet.of(Path.Type.file))).find(DescriptiveUrl.Type.authenticated).getUrl());
    }