try {
NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
SubnetApi api = neutronApi.getSubnetApi("RegionOne");
Subnet subnet = api.get("12345");
/*
* Check request
*/
assertEquals(server.getRequestCount(), 2);
assertAuthentication(server);
assertRequest(server.takeRequest(), "GET", "/v2.0/subnets/12345");
/*
* Check response
*/
assertNotNull(subnet);
assertEquals(subnet.getName(), "jclouds-wibble");
assertEquals(subnet.getId(), "624312ff-d14b-4ba3-9834-1c78d23d574d");
assertEquals(subnet.getTenantId(), "1234567890");
assertEquals(subnet.getIPv6AddressMode(), IPv6DHCPMode.SLAAC);
} finally {
server.shutdown();
}
}