@Override
    public Set<Name> getLocations() {
        final Set<Name> locations = new LinkedHashSet<>();
        if(StringUtils.isNotBlank(session.getHost().getRegion())) {
            locations.add(new SwiftRegion(session.getHost().getRegion()));
        }
        else {
            final List<Region> regions = new ArrayList<>(session.getClient().getRegions());
            regions.sort(new Comparator<Region>() {
                @Override
                public int compare(final Region r1, final Region r2) {
                    if(r1.isDefault()) {
                        return -1;
                    }
                    if(r2.isDefault()) {
                        return 1;
                    }
                    return 0;
                }
            });
            for(Region region : regions) {
                if(StringUtils.isBlank(region.getRegionId())) {
                    // v1 authentication contexts do not have region support
                    continue;
                }
                locations.add(new SwiftRegion(region.getRegionId()));
            }
        }
        return locations;
    }
@Test
    public void testGetLocations() throws Exception {
        final Set<Location.Name> locations = new SwiftLocationFeature(session).getLocations();
        assertTrue(locations.contains(new SwiftLocationFeature.SwiftRegion("DFW")));
        assertTrue(locations.contains(new SwiftLocationFeature.SwiftRegion("ORD")));
        assertTrue(locations.contains(new SwiftLocationFeature.SwiftRegion("SYD")));
        assertEquals(new SwiftLocationFeature.SwiftRegion("DFW"), locations.iterator().next());
    }