EBSRaiderImpl implements EBSRaider { public String detachEbsVolume(String volumeId) { if (volumeId.isEmpty() || volumeId == null) { throw new InvalidInputDataException("Empty/Null volumeId provided in request"); } DetachVolumeRequest request1 = new DetachVolumeRequest(volumeId).withForce(true); DetachVolumeResult response = ec2Delegator.getEc2().detachVolume(request1); return response.toString(); } EBSRaiderImpl(); String detachEbsVolume(String volumeId); String attachEbsVolume(String instanceId, String deviceName, String volumeId); Map getVolumesState(String... volumeIds); List<Volume> getVolumesForGivenInstanceId(String instanceId);  }
@Test public void testdetachEbsVolume() throws Exception{ ebsRaiderImplUnderTest.detachEbsVolume("123"); }
@Test(expected=InvalidInputDataException.class) public void testdetachEbsInvalidVolume() throws Exception{ ebsRaiderImplUnderTest.detachEbsVolume(""); }