CreateImageOptions extends BaseEC2RequestOptions { public CreateImageOptions withDescription(String description) { formParameters.put("Description", checkNotNull(description, "description")); return this; }  CreateImageOptions withDescription(String description); String getDescription(); CreateImageOptions noReboot(); boolean getNoReboot(); static final CreateImageOptions NONE; }
@Test public void testWithDescriptionStatic() { CreateImageOptions options = withDescription("test"); assertEquals(options.buildFormParameters().get("Description"), ImmutableList.of("test")); }
@Test(expectedExceptions = NullPointerException.class) public void testWithDescriptionNPE() { withDescription(null); }
@Test public void testWithDescription() { CreateImageOptions options = new CreateImageOptions(); options.withDescription("test"); assertEquals(options.buildFormParameters().get("Description"), ImmutableList.of("test")); }