@Override
    public LoggingConfiguration getConfiguration(final Path file) throws BackgroundException {
        final Path bucket = containerService.getContainer(file);
        if(bucket.isRoot()) {
            return LoggingConfiguration.empty();
        }
        try {
            final Storage.Buckets.Get request = session.getClient().buckets().get(bucket.getName());
            if(containerService.getContainer(file).attributes().getCustom().containsKey(GoogleStorageAttributesFinderFeature.KEY_REQUESTER_PAYS)) {
                request.setUserProject(session.getHost().getCredentials().getUsername());
            }
            final Bucket.Logging status = request.execute().getLogging();
            if(null == status) {
                return LoggingConfiguration.empty();
            }
            final LoggingConfiguration configuration = new LoggingConfiguration(
                    status.getLogObjectPrefix() != null, status.getLogBucket());
            try {
                configuration.setContainers(new GoogleStorageBucketListService(session).list(
                        new Path(String.valueOf(Path.DELIMITER), EnumSet.of(Path.Type.volume, Path.Type.directory)),
                        new DisabledListProgressListener()).toList());
            }
            catch(AccessDeniedException | InteroperabilityException e) {
                log.warn(String.format("Failure listing buckets. %s", e.getMessage()));
            }
            return configuration;
        }
        catch(IOException e) {
            try {
                throw new GoogleStorageExceptionMappingService().map("Failure to read attributes of {0}", e, bucket);
            }
            catch(AccessDeniedException | InteroperabilityException l) {
                log.warn(String.format("Missing permission to read logging configuration for %s %s", bucket.getName(), e.getMessage()));
                return LoggingConfiguration.empty();
            }
        }
    }
@Test(expected = NotfoundException.class)
    public void testReadNotFound() throws Exception {
        new GoogleStorageLoggingFeature(session).getConfiguration(
            new Path(new AsciiRandomStringService().random().toLowerCase(Locale.ROOT), EnumSet.of(Path.Type.directory))
        );
    }