@Override
    public DescriptiveUrlBag toUrl(final Path file) {
        final DescriptiveUrlBag list = new DescriptiveUrlBag();
        list.add(new DescriptiveUrl(this.toUrl(file, distribution.getOrigin()), DescriptiveUrl.Type.origin,
            MessageFormat.format(LocaleFactory.localizedString("{0} {1} URL"),
                distribution.getName(),
                LocaleFactory.localizedString("Origin", "Info"))));
        if(distribution.getUrl() != null) {
            list.add(new DescriptiveUrl(this.toUrl(file, distribution.getUrl()), DescriptiveUrl.Type.cdn,
                MessageFormat.format(LocaleFactory.localizedString("{0} {1} URL"),
                    distribution.getName(),
                    LocaleFactory.localizedString(distribution.getMethod().toString(), "S3"))));
        }
        if(distribution.getSslUrl() != null) {
            list.add(new DescriptiveUrl(this.toUrl(file, distribution.getSslUrl()), DescriptiveUrl.Type.cdn,
                String.format("%s (SSL)", MessageFormat.format(LocaleFactory.localizedString("{0} {1} URL"),
                    distribution.getName(),
                    LocaleFactory.localizedString(distribution.getMethod().toString(), "S3")))));
        }
        if(distribution.getStreamingUrl() != null) {
            list.add(new DescriptiveUrl(this.toUrl(file, distribution.getStreamingUrl()), DescriptiveUrl.Type.cdn,
                String.format("%s (Streaming)", MessageFormat.format(LocaleFactory.localizedString("{0} {1} URL"),
                    distribution.getName(),
                    LocaleFactory.localizedString(distribution.getMethod().toString(), "S3")))));
        }
        if(distribution.getiOSstreamingUrl() != null) {
            list.add(new DescriptiveUrl(this.toUrl(file, distribution.getiOSstreamingUrl()), DescriptiveUrl.Type.cdn,
                String.format("%s (iOS Streaming)", MessageFormat.format(LocaleFactory.localizedString("{0} {1} URL"),
                    distribution.getName(),
                    LocaleFactory.localizedString(distribution.getMethod().toString(), "S3")))));
        }
        list.addAll(this.toCnameUrl(file));
        return list;
    }
@Test
    public void testCustomOrigin() {
        final Distribution distribution = new Distribution(Distribution.CUSTOM, "n", URI.create("http://test.cyberduck.ch/"), true);
        final DescriptiveUrl url = new DistributionUrlProvider(distribution).toUrl(new Path("/p/f", EnumSet.of(Path.Type.directory))).find(DescriptiveUrl.Type.origin);
        assertEquals("http://test.cyberduck.ch/p/f", url.getUrl());
        assertEquals("n Origin URL", url.getHelp());
    }