public void replaceRouteNotFound() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/replace_route.xml"); final boolean created = routeTableApi().replaceRoute(DEFAULT_REGION, "rtb-a77f2ac0", gatewayId("vgw-1d00376e").destinationCidrBlock("172.18.19.0/24")); assertTrue(created, "Failed to match 'true' in test data response"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=ReplaceRoute&RouteTableId=rtb-a77f2ac0&GatewayId=vgw-1d00376e&DestinationCidrBlock=172.18.19.0/24"); }
public void replaceRoute() throws Exception { enqueueRegions(DEFAULT_REGION); enqueue(DEFAULT_REGION, new MockResponse().setResponseCode(404)); final boolean created = routeTableApi().replaceRoute(DEFAULT_REGION, "rtb-a77f2ac0", gatewayId("vgw-1d00376e").destinationCidrBlock("172.18.19.0/24")); assertFalse(created, "Reported successful replace of route in non-existent route table"); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=ReplaceRoute&RouteTableId=rtb-a77f2ac0&GatewayId=vgw-1d00376e&DestinationCidrBlock=172.18.19.0/24"); }