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