assertNotNull(network);
Subnet subnet = subnetApi.create(network.getId(), 4, "192.168.0.0/16");
assertNotNull(subnet);
Router ref = routerApi.create(CreateRouterOptions.builder().name("jclouds-router-test")
.externalGatewayInfo(ExternalGatewayInfo.builder().networkId(network.getId()).build()).build());
assertNotNull(ref);
Router router = routerApi.get(ref.getId());
assertEquals(router.getId(), ref.getId());
assertEquals(router.getName(), "jclouds-router-test");
assertEquals(router.getExternalGatewayInfo().getNetworkId(), network.getId());
assertTrue(routerApi.update(router.getId(), UpdateRouterOptions.builder().name("jclouds-router-test-rename").build()));
router = routerApi.get(ref.getId());
assertEquals(router.getId(), ref.getId());
assertEquals(router.getName(), "jclouds-router-test-rename");
ReferenceWithName ref2 = routerApi.create(CreateRouterOptions.builder().name("jclouds-router-test2")
.externalGatewayInfo(ExternalGatewayInfo.builder().networkId(network.getId()).build()).build());
assertNotNull(ref2);