@Override
    protected URI getOrigin(final Path container, final Distribution.Method method) throws BackgroundException {
        if(Distribution.WEBSITE_CDN.equals(method)) {
            return URI.create(String.format("http://%s", this.getWebsiteHostname(container)));
        }
        return super.getOrigin(container, method);
    }
@Test
    public void testGetOrigin() throws Exception {
        final WebsiteCloudFrontDistributionConfiguration configuration = new WebsiteCloudFrontDistributionConfiguration(
            session, new S3LocationFeature(session), new DisabledX509TrustManager(), new DefaultX509KeyManager()
        );
        final Path container = new Path("test-eu-central-1-cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
        assertEquals("test-eu-central-1-cyberduck.s3.amazonaws.com",
            configuration.getOrigin(container, Distribution.DOWNLOAD).getHost());
        assertEquals("test-eu-central-1-cyberduck.s3.amazonaws.com",
            configuration.getOrigin(container, Distribution.WEBSITE).getHost());
        assertEquals("test-eu-central-1-cyberduck.s3-website-eu-central-1.amazonaws.com",
            configuration.getOrigin(container, Distribution.WEBSITE_CDN).getHost());
    }