RegisterImageBackedByEbsOptions extends RegisterImageOptions { @Override public RegisterImageBackedByEbsOptions asArchitecture(Architecture architecture) { return (RegisterImageBackedByEbsOptions) super.asArchitecture(architecture); }  RegisterImageBackedByEbsOptions addEphemeralBlockDeviceFromSnapshot(String deviceName,
            @Nullable String virtualName, String snapshotId); RegisterImageBackedByEbsOptions addNewEphemeralBlockDevice(String deviceName,
            @Nullable String virtualName, int volumeSize); RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName,
            @Nullable String virtualName, String snapshotId); RegisterImageBackedByEbsOptions addNewBlockDevice(String deviceName,
            @Nullable String virtualName, int volumeSize); @Override RegisterImageBackedByEbsOptions asArchitecture(Architecture architecture); @Override RegisterImageBackedByEbsOptions withDescription(String info); @Override RegisterImageBackedByEbsOptions withKernelId(String kernelId); @Override RegisterImageBackedByEbsOptions withRamdisk(String ramDiskId);  }
@Test public void testWithArchitecture() { RegisterImageBackedByEbsOptions options = new RegisterImageBackedByEbsOptions(); options.asArchitecture(Architecture.I386); assertEquals(options.buildFormParameters().get("Architecture"), ImmutableList.of("i386")); }
@Test public void testWithArchitectureStatic() { RegisterImageBackedByEbsOptions options = asArchitecture(Architecture.I386); assertEquals(options.buildFormParameters().get("Architecture"), ImmutableList.of("i386")); }
@Test(expectedExceptions = NullPointerException.class) public void testWithArchitectureNPE() { asArchitecture(null); }