HttpResponse deleteInstanceResponse = HttpResponse.builder().statusCode(202).build();
List<HttpRequest> requests = ImmutableList.of( keystoneAuthWithUsernameAndPasswordAndTenantName, createInstance, createInstance, createInstance, getInstance, deleteInstance, getInstance, createInstance, createInstance, getInstance);
List<HttpResponse> responses = ImmutableList.of(responseWithKeystoneAccess, createInstanceFail, createInstanceFail, createInstanceSuccess, badStatus, deleteInstanceResponse, deletedStatus, createInstanceFail, createInstanceSuccess, goodStatus);
TroveApi api = orderedRequestsSendResponses(requests, responses);
TroveUtils utils = new TroveUtils(api);
Instance instance = utils.getWorkingInstance("RegionOne", "json_rack_instance", "1", 2);
assertEquals(instance.getSize(),2);
assertEquals(instance.getName(), "json_rack_instance");