@Override
    public Path copy(final Path source, final Path copy, final TransferStatus status, final ConnectionCallback callback, final StreamListener listener) throws BackgroundException {
        try {
            final CloudBlob target = session.getClient().getContainerReference(containerService.getContainer(copy).getName())
                    .getAppendBlobReference(containerService.getKey(copy));
            final CloudBlob blob = session.getClient().getContainerReference(containerService.getContainer(source).getName())
                    .getBlobReferenceFromServer(containerService.getKey(source));
            final BlobRequestOptions options = new BlobRequestOptions();
            options.setStoreBlobContentMD5(new HostPreferences(session.getHost()).getBoolean("azure.upload.md5"));
            final URI s = session.getHost().getCredentials().isTokenAuthentication() ?
                    URI.create(blob.getUri().toString() + session.getHost().getCredentials().getToken()) : blob.getUri();
            final String id = target.startCopy(s,
                    AccessCondition.generateEmptyCondition(), AccessCondition.generateEmptyCondition(), options, context);
            if(log.isDebugEnabled()) {
                log.debug(String.format("Started copy for %s with copy operation ID %s", copy, id));
            }
            listener.sent(status.getLength());
            return copy;
        }
        catch(StorageException e) {
            throw new AzureExceptionMappingService().map("Cannot copy {0}", e, source);
        }
        catch(URISyntaxException e) {
            throw new NotfoundException(e.getMessage(), e);
        }
    }
@Test
    public void testCopy() throws Exception {
        final Path container = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final Path test = new AzureTouchFeature(session, null).touch(
                new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
        Thread.sleep(1000L);
        final AzureCopyFeature feature = new AzureCopyFeature(session, null);
        assertThrows(UnsupportedException.class, () -> feature.preflight(container, test));
        try {
            feature.preflight(container, test);
        }
        catch(UnsupportedException e) {
            assertEquals("Unsupported", e.getMessage());
            assertEquals("Cannot copy cyberduck.", e.getDetail(false));
        }
        final Path copy = feature.copy(test,
                new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus(), new DisabledConnectionCallback(), new DisabledStreamListener());
        assertEquals(test.attributes().getChecksum(), copy.attributes().getChecksum());
        assertNotEquals(new AzureAttributesFinderFeature(session, null).find(test).getModificationDate(), new AzureAttributesFinderFeature(session, null).find(copy).getModificationDate());
        assertTrue(new AzureFindFeature(session, null).find(test));
        assertTrue(new AzureFindFeature(session, null).find(copy));
        new AzureDeleteFeature(session, null).delete(Arrays.asList(test, copy), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }