@Override
    public boolean find(final Path file, final ListProgressListener listener) throws BackgroundException {
        if(file.isRoot()) {
            return true;
        }
        try {
            final Ds3Client client = new SpectraClientBuilder().wrap(session.getClient(), session.getHost());
            if(containerService.isContainer(file)) {
                final HeadBucketResponse response = client.headBucket(new HeadBucketRequest(containerService.getContainer(file).getName()));
                switch(response.getStatus()) {
                    case DOESNTEXIST:
                        return false;
                }
                return true;
            }
            else {
                final HeadObjectResponse response = client.headObject(new HeadObjectRequest(containerService.getContainer(file).getName(), containerService.getKey(file)));
                switch(response.getStatus()) {
                    case DOESNTEXIST:
                        return false;
                }
                return true;
            }
        }
        catch(FailedRequestException e) {
            throw new SpectraExceptionMappingService().map("Failure to read attributes of {0}", e, file);
        }
        catch(IOException e) {
            throw new DefaultIOExceptionMappingService().map("Failure to read attributes of {0}", e, file);
        }
    }
@Test
    public void testFindUnknownBucket() throws Exception {
        final Path test = new Path(new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.volume, Path.Type.directory));
        assertFalse(new SpectraFindFeature(session).find(test));
    }