* @author Adam Lowe
*/
public class NovaEC2InstanceClientExpectTest extends BaseNovaEC2RestClientExpectTest {
public void testDescribeInstancesWithDashesInPlaceOfNullDates() {
InstanceClient client = requestsSendResponses(
describeAvailabilityZonesRequest,
describeAvailabilityZonesResponse,
HttpRequest.builder().method("POST")
.endpoint("http://localhost:8773/services/Cloud/")
.addHeader("Host", "localhost:8773")
.payload(payloadFromStringWithContentType("Action=DescribeInstances&Signature=kkCE1HzyntmkICEidOizw50B9yjLdNZvAWUXVse1c8o%3D&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-16T15%3A54%3A08.897Z&Version=2009-04-04&AWSAccessKeyId=identity", "application/x-www-form-urlencoded")).build(),
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/nova_ec2_describe_instances.xml")).build()
).getInstanceServices();
Set<? extends Reservation<? extends RunningInstance>> response = client.describeInstancesInRegion("nova");
assertEquals(response.size(), 3);
Reservation<? extends RunningInstance> target = Iterables.get(response, 2);
RunningInstance runningInstance = Iterables.getOnlyElement(target);