> +
> +         // Refresh
> +         securityGroup = sgApi.getSecurityGroup(securityGroup.getId());
> +
> +         assertEquals(securityGroup.getName(), "jclouds-test");
> +         assertEquals(securityGroup.getDescription(), "jclouds test security 
> group");
> +
> +         assertEquals(securityGroup.getRules().size(), 3, "Expected 2 
> default rules");
> +
> +         Rule newSecGroupRule = null;
> +         for(Rule sgr : securityGroup.getRules()) {
> +            if(sgr.getId().equals(rule.getId())) {
> +               newSecGroupRule = sgr;
> +               break;
> +            }
> +         }

[minor] Could also write this using Iterables.find?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/132/files#r17027682

Reply via email to