DescribeSnapshotsOptions extends BaseEC2RequestOptions { public DescribeSnapshotsOptions ownedBy(String... owners) { indexFormValuesWithPrefix("Owner", owners); return this; }  DescribeSnapshotsOptions restorableBy(String... accountIds); String getRestorableBy(); DescribeSnapshotsOptions snapshotIds(String... snapshotIds); Set<String> getSnapshotIds(); DescribeSnapshotsOptions ownedBy(String... owners); Set<String> getOwners();  }
@Test public void testOwners() { DescribeSnapshotsOptions options = new DescribeSnapshotsOptions(); options.ownedBy("test"); assertEquals(options.buildFormParameters().get("Owner.1"), ImmutableList.of("test")); }
@Test public void testMultipleOwners() { DescribeSnapshotsOptions options = new DescribeSnapshotsOptions(); options.ownedBy("test", "trouble"); assertEquals(options.buildFormParameters().get("Owner.1"), ImmutableList.of("test")); assertEquals(options.buildFormParameters().get("Owner.2"), ImmutableList.of("trouble")); }
@Test public void testOwnersStatic() { DescribeSnapshotsOptions options = ownedBy("test"); assertEquals(options.buildFormParameters().get("Owner.1"), ImmutableList.of("test")); }