assertNotNull(network2);
Subnet subnet2 = subnetApi.create(network2.getId(), 4, "192.169.0.0/16");
assertNotNull(subnet2);
Port port = portApi.create(network.getId());
assertNotNull(port);
Port port2 = portApi.create(network2.getId());
assertNotNull(port2);
Router router = routerApi.create(CreateRouterOptions.builder().name("jclouds-router-test").build());
assertNotNull(router);
RouterInterface routerInterface = routerApi.addInterfaceForPort(router.getId(), port.getId());
assertNotNull(routerInterface);
RouterInterface routerInterface2 = routerApi.addInterfaceForPort(router.getId(), port2.getId());
assertNotNull(routerInterface2);
assertTrue(routerApi.removeInterfaceForPort(router.getId(), port.getId()));
assertTrue(routerApi.removeInterfaceForPort(router.getId(), port2.getId()));
assertTrue(routerApi.delete(router.getId()));
assertTrue(subnetApi.delete(subnet.getId()));
assertTrue(networkApi.delete(network.getId()));
assertTrue(subnetApi.delete(subnet2.getId()));
assertTrue(networkApi.delete(network2.getId()));