public void test() {
    InputStream is = getClass().getResourceAsStream("/describe_securitygroups.xml");

    IterableWithMarker<SecurityGroup> expected = expected();

    DescribeDBSecurityGroupsResultHandler handler =
        injector.getInstance(DescribeDBSecurityGroupsResultHandler.class);
    IterableWithMarker<SecurityGroup> result = factory.create(handler).parse(is);

    assertEquals(result.toString(), expected.toString());
  }
  @Test
  protected void testDescribeSecurityGroups() {
    IterableWithMarker<SecurityGroup> response = api().list().get(0);

    for (SecurityGroup securityGroup : response) {
      checkSecurityGroup(securityGroup);
    }

    if (Iterables.size(response) > 0) {
      SecurityGroup securityGroup = response.iterator().next();
      Assert.assertEquals(api().get(securityGroup.getName()), securityGroup);
    }

    // Test with a Marker, even if it's null
    response =
        api().list(ListSecurityGroupsOptions.Builder.afterMarker(response.nextMarker().orNull()));
    for (SecurityGroup securityGroup : response) {
      checkSecurityGroup(securityGroup);
    }
  }