DetachVolumeOptions extends BaseEC2RequestOptions { public DetachVolumeOptions fromDevice(String device) { formParameters.put("Device", checkNotNull(device, "device")); return this; }  DetachVolumeOptions fromInstance(String instanceId); String getInstance(); DetachVolumeOptions fromDevice(String device); String getDevice();  }
@Test public void testFromDevice() { DetachVolumeOptions options = new DetachVolumeOptions(); options.fromDevice("test"); assertEquals(options.buildFormParameters().get("Device"), ImmutableList.of("test")); }
@Test public void testFromDeviceStatic() { DetachVolumeOptions options = fromDevice("test"); assertEquals(options.buildFormParameters().get("Device"), ImmutableList.of("test")); }
@Test(expectedExceptions = NullPointerException.class) public void testFromDeviceNPE() { fromDevice(null); }