@Override
    public void setConfiguration(final Path file, final LoggingConfiguration configuration) throws BackgroundException {
        final Path bucket = containerService.getContainer(file);
        try {
            final Storage.Buckets.Patch request = session.getClient().buckets().patch(bucket.getName(),
                    new Bucket().setLogging(new Bucket.Logging()
                            .setLogObjectPrefix(configuration.isEnabled() ? new HostPreferences(session.getHost()).getProperty("google.logging.prefix") : null)
                            .setLogBucket(StringUtils.isNotBlank(configuration.getLoggingTarget()) ? configuration.getLoggingTarget() : bucket.getName()))
            );
            if(bucket.attributes().getCustom().containsKey(GoogleStorageAttributesFinderFeature.KEY_REQUESTER_PAYS)) {
                request.setUserProject(session.getHost().getCredentials().getUsername());
            }
            request.execute();
        }
        catch(IOException e) {
            throw new GoogleStorageExceptionMappingService().map("Failure to write attributes of {0}", e, file);
        }
    }
@Test(expected = NotfoundException.class)
    public void testWriteNotFound() throws Exception {
        new GoogleStorageLoggingFeature(session).setConfiguration(
            new Path(new AsciiRandomStringService().random(), EnumSet.of(Path.Type.directory)), new LoggingConfiguration(false)
        );
    }