HttpResponse getWithRuleResponse = HttpResponse.builder().statusCode(200)
.payload(payloadFromResource("/getsecuritygroupresponse_extension_byid_with_group.json"))
.build();
SecurityGroupExtension extension = orderedRequestsSendResponses(
ImmutableList.of(getWithRule, revokeRule, queryAsyncJobResultAuthorizeIngress, getWithRule),
ImmutableList.of(getWithRuleResponse, revokeRuleResponse,
queryAsyncJobResultAuthorizeIngressResponse, getEmptyResponse)
).getSecurityGroupExtension().get();
ImmutableMultimap.Builder<String, String> permBuilder = ImmutableMultimap.builder();
permBuilder.put("adrian", "adriancole");
SecurityGroup origGroup = new SecurityGroupBuilder().id("13").build();
SecurityGroup newGroup = extension.removeIpPermission(IpProtocol.TCP, 22, 22,
permBuilder.build(), emptyStringSet(), emptyStringSet(), origGroup);
assertEquals(newGroup.getIpPermissions().size(), 0);
}