// differences when ip allocation
expect(ipClient.allocateAddressInRegion(region)).andReturn("1.1.1.1");
expect(strategy.runningInstanceToNodeMetadata.apply(instance)).andReturn(nodeMetadata).atLeastOnce();
ipClient.associateAddressInRegion(region, "1.1.1.1", instanceCreatedId);
strategy.elasticIpCache.put(new RegionAndName(region, instanceCreatedId), "1.1.1.1");
expect(instanceClient.runInstancesInRegion(region, zone, imageId, 1, input.count, ec2Options)).andReturn(
Reservation.class.cast(reservation));
expect(instance.getId()).andReturn(instanceCreatedId).atLeastOnce();
// simulate a lazy credentials fetch
LoginCredentials creds = LoginCredentials.builder().user("foo").privateKey("bar").build();
expect(strategy.instanceToCredentials.apply(instance)).andReturn(Optional.of(creds));
expect(instance.getRegion()).andReturn(region).atLeastOnce();
expect(strategy.credentialStore.put("node#" + region + "/" + instanceCreatedId, creds)).andReturn(null);
expect(strategy.presentInstances.apply(ImmutableSet.of(new RegionAndName(region, instanceCreatedId)))).andReturn(ImmutableSet.of(instance));
expect(input.template.getOptions()).andReturn(input.options).atLeastOnce();
expect(input.options.getLoginUser()).andReturn(null);
expect(input.options.getLoginPassword()).andReturn(null);
expect(input.options.getLoginPrivateKey()).andReturn(null);
expect(input.options.shouldAuthenticateSudo()).andReturn(null);