DescribeImagesOptions extends BaseEC2RequestOptions { public DescribeImagesOptions ownedBy(String... owners) { indexFormValuesWithPrefix("Owner", owners); return this; }  DescribeImagesOptions executableBy(String identityId); String getExecutableBy(); DescribeImagesOptions imageIds(String... imageIds); DescribeImagesOptions imageIds(Iterable<String> imageIds); Set<String> getImageIds(); DescribeImagesOptions ownedBy(String... owners); Set<String> getOwners(); static final DescribeImagesOptions NONE; }
@Test public void testOwners() { DescribeImagesOptions options = new DescribeImagesOptions(); options.ownedBy("test"); assertEquals(options.buildFormParameters().get("Owner.1"), ImmutableList.of("test")); }
@Test public void testMultipleOwners() { DescribeImagesOptions options = new DescribeImagesOptions(); 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() { DescribeImagesOptions options = ownedBy("test"); assertEquals(options.buildFormParameters().get("Owner.1"), ImmutableList.of("test")); }