RegisterImageOptions extends BaseEC2RequestOptions { public RegisterImageOptions withDescription(String info) { formParameters.put("Description", checkNotNull(info, "info")); return this; }  RegisterImageOptions asArchitecture(Architecture architecture); RegisterImageOptions withDescription(String info); RegisterImageOptions withKernelId(String kernelId); RegisterImageOptions withRamdisk(String ramDiskId);  }
@Test public void testWithDescription() { RegisterImageOptions options = new RegisterImageOptions(); options.withDescription("test"); assertEquals(options.buildFormParameters().get("Description"), ImmutableList.of("test")); }
@Test public void testWithDescriptionStatic() { RegisterImageOptions options = withDescription("test"); assertEquals(options.buildFormParameters().get("Description"), ImmutableList.of("test")); }
@Test(expectedExceptions = NullPointerException.class) public void testWithDescriptionNPE() { withDescription(null); }