@Test(enabled = false, dependsOnMethods = "testReboot")
void testElasticIpAddress() throws InterruptedException, ExecutionException, TimeoutException, IOException {
address = client.getElasticIPAddressApi().get().allocateAddressInRegion(null);
assertNotNull(address);
PublicIpInstanceIdPair compare = Iterables.getLast(client.getElasticIPAddressApi().get()
.describeAddressesInRegion(null, address));
assertEquals(compare.getPublicIp(), address);
assert compare.getInstanceId() == null;
client.getElasticIPAddressApi().get().associateAddressInRegion(null, address, instanceId);
compare = Iterables.getLast(client.getElasticIPAddressApi().get().describeAddressesInRegion(null, address));
assertEquals(compare.getPublicIp(), address);
assertEquals(compare.getInstanceId(), instanceId);
Reservation<? extends RunningInstance> reservation = Iterables.getOnlyElement(client.getInstanceApi().get()
.describeInstancesInRegion(null, instanceId));
assertNotNull(Iterables.getOnlyElement(reservation).getIpAddress());
assertNotEquals(address, Iterables.getOnlyElement(reservation).getIpAddress());
doCheckKey(address);
client.getElasticIPAddressApi().get().disassociateAddressInRegion(null, address);
compare = Iterables.getLast(client.getElasticIPAddressApi().get().describeAddressesInRegion(null, address));
assertEquals(compare.getPublicIp(), address);
assert compare.getInstanceId() == null;
reservation = Iterables.getOnlyElement(client.getInstanceApi().get().describeInstancesInRegion(null, instanceId));
// assert reservation.getRunningInstances().last().getIpAddress() == null;
// TODO
}