ElasticIPAddressClient ipClient = createMock(ElasticIPAddressClient.class);
InstanceClient instanceClient = createMock(InstanceClient.class);
NodeMetadata node = createMock(NodeMetadata.class);
expect(elasticIpCache.get(new RegionAndName("region", "i-blah"))).andReturn("1.1.1.1");
expect(client.getElasticIPAddressServices()).andReturn(ipClient).atLeastOnce();
ipClient.disassociateAddressInRegion("region", "1.1.1.1");
ipClient.releaseAddressInRegion("region", "1.1.1.1");
elasticIpCache.invalidate(new RegionAndName("region", "i-blah"));
expect(client.getInstanceServices()).andReturn(instanceClient).atLeastOnce();
expect(instanceClient.terminateInstancesInRegion("region", "i-blah")).andReturn(null);
expect(getNode.getNode("region/i-blah")).andReturn(node);