@Override
    public void setConfiguration(final Path file, final PasswordCallback prompt, final VersioningConfiguration configuration) throws BackgroundException {
        final Path container = containerService.getContainer(file);
        try {
            final VersioningConfiguration current = this.getConfiguration(container);
            if(configuration.isEnabled()) {
                if(current.isEnabled()) {
                    log.debug(String.format("Versioning already enabled for bucket %s", container));
                }
                else {
                    log.debug(String.format("Enable bucket versioning for %s", container));
                    final Ds3Client client = new SpectraClientBuilder().wrap(session.getClient(), session.getHost());
                    final GetBucketSpectraS3Response bucket = client.getBucketSpectraS3(new GetBucketSpectraS3Request(container.getName()));
                    final UUID id = bucket.getBucketResult().getDataPolicyId();
                    client.modifyDataPolicySpectraS3(new ModifyDataPolicySpectraS3Request(id).withVersioning(VersioningLevel.KEEP_MULTIPLE_VERSIONS));
                }
            }
            else {
                log.warn(String.format("Disable bucket versioning for %s is not supported", container));
            }
            cache.remove(container);
        }
        catch(FailedRequestException e) {
            throw new SpectraExceptionMappingService().map("Failure to write attributes of {0}", e, container);
        }
        catch(IOException e) {
            throw new DefaultIOExceptionMappingService().map("Failure to write attributes of {0}", e, container);
        }
    }
@Test
    @Ignore
    public void testSetConfiguration() throws Exception {
        final Path container = new SpectraDirectoryFeature(session, new SpectraWriteFeature(session)).mkdir(
                new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
        final Versioning feature = new SpectraVersioningFeature(session);
        feature.setConfiguration(container, new DisabledLoginCallback(), new VersioningConfiguration(true, false));
        assertTrue(feature.getConfiguration(container).isEnabled());
        new SpectraDeleteFeature(session).delete(Collections.singletonList(container), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }