### Question:
MultiLocation extends AbstractLocation implements MachineProvisioningLocation<T> { public List<MachineProvisioningLocation<?>> getSubLocations() { return getRequiredConfig(SUB_LOCATIONS); }  @Override void init(); T obtain(); @SuppressWarnings("unchecked") @Override T obtain(Map<?, ?> flags); List<MachineProvisioningLocation<?>> getSubLocations(); @SuppressWarnings("unchecked") @Override MachineProvisioningLocation<T> newSubLocation(Map<?, ?> newFlags); @SuppressWarnings("unchecked") @Override void release(T machine); @Override Map<String, Object> getProvisioningFlags(Collection<String> tags); @SuppressWarnings("serial")
    @SetFromFlag("subLocations")
    static final ConfigKey<List<MachineProvisioningLocation<?>>> SUB_LOCATIONS; }### Answer:
@Test public void testHasAvailabilityZonesAsSubLocations() throws Exception { multiLoc.hasExtension(AvailabilityZoneExtension.class); AvailabilityZoneExtension extension = multiLoc.getExtension(AvailabilityZoneExtension.class); Asserts.assertEqualsIgnoringOrder(extension.getAllSubLocations(), ImmutableList.of(loc1, loc2)); Asserts.assertEqualsIgnoringOrder(extension.getSubLocations(2), ImmutableList.of(loc1, loc2)); assertTrue(ImmutableList.of(loc1, loc2).containsAll(extension.getSubLocations(1))); }