public Region lookup(final Path file) throws BackgroundException {
        final Path container = containerService.getContainer(file);
        if(Location.unknown.equals(new SwiftLocationFeature.SwiftRegion(container.attributes().getRegion()))) {
            return this.lookup(location.getLocation(container));
        }
        return this.lookup(new SwiftLocationFeature.SwiftRegion(container.attributes().getRegion()));
    }
@Test
    public void testFindDefaultLocationInBookmark() throws Exception {
        final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new SwiftProtocol())));
        final Profile profile = new ProfilePlistReader(factory).read(
                this.getClass().getResourceAsStream("/Rackspace US (IAD).cyberduckprofile"));
        final SwiftSession session = new SwiftSession(
                new Host(profile, "identity.api.rackspacecloud.com",
                        new Credentials(
                                PROPERTIES.get("rackspace.user"), PROPERTIES.get("rackspace.password")
                        )), new DisabledX509TrustManager(), new DefaultX509KeyManager()) {

        };
        assertEquals("IAD", session.getHost().getRegion());
        final Region location = new SwiftRegionService(session).lookup(new Path("/test.cyberduck.ch",
            EnumSet.of(Path.Type.directory, Path.Type.volume)));
        assertNotNull(location);
        assertEquals("IAD", location.getRegionId());
    }