@Override
    public Name getLocation(final Path file) throws BackgroundException {
        if(StringUtils.isNotBlank(session.getHost().getRegion())) {
            return new S3Region(session.getHost().getRegion());
        }
        final Path bucket = containerService.getContainer(file);
        return this.getLocation(bucket.isRoot() ? StringUtils.EMPTY : bucket.getName());
    }
@Test(expected = NotfoundException.class)
    public void testNotfound() throws Exception {
        final RegionEndpointCache cache = session.getClient().getRegionEndpointCache();
        final S3LocationFeature feature = new S3LocationFeature(session, cache);
        final String bucket = new AsciiRandomStringService().random();
        feature.getLocation(new Path(bucket, EnumSet.of(Path.Type.volume, Path.Type.directory)));
        assertNull(cache.getRegionForBucketName(bucket));
    }