requestResponseMap.put(createKeyPairRequest, createKeyPairResponse);
requestResponseMap.put(createSecurityGroupRequest, createSecurityGroupResponse);
requestResponseMap.put(authorizeSecurityGroupIngressRequestGroupTenant, authorizeSecurityGroupIngressResponse);
SecurityGroupExtension extension = requestsSendResponses(requestResponseMap.build()).getSecurityGroupExtension().get();
SecurityGroupBuilder groupBuilder = new SecurityGroupBuilder();
groupBuilder.id("jclouds#some-group");
groupBuilder.providerId("sg-3c6ef654");
groupBuilder.name("jclouds#some-group");
groupBuilder.ownerId("993194456877");
groupBuilder.location(new LocationBuilder()
.scope(LocationScope.REGION)
.id(region)
.description("region")
.build());
SecurityGroup origGroup = groupBuilder.build();
ImmutableMultimap.Builder<String, String> permBuilder = ImmutableMultimap.builder();
permBuilder.put(origGroup.getOwnerId(), origGroup.getName());
SecurityGroup newGroup = extension.addIpPermission(IpProtocol.TCP,
22,
40,
permBuilder.build(),
emptyStringSet(),
emptyStringSet(),