NovaApi apiWhenSecurityGroupsExist = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse, list,
listResponse);
FindSecurityGroupWithNameAndReturnTrue predicate = new FindSecurityGroupWithNameAndReturnTrue(
apiWhenSecurityGroupsExist);
AtomicReference<RegionAndName> securityGroupInRegionRef = Atomics.newReference(RegionAndName
.fromRegionAndName("az-1.region-a.geo-1", "name1"));
// we can find it
assertTrue(predicate.apply(securityGroupInRegionRef));
// the reference is now up to date, and includes the actual group found.
assertEquals(securityGroupInRegionRef.get().toString(), new SecurityGroupInRegion(Iterables
.getOnlyElement(new ParseSecurityGroupListTest().expected()), "az-1.region-a.geo-1").toString());