public void testIsLuShared() {
final String luName = appliance.getVolumeName("volume1");
when(client.execute(IntegerNmsResponse.class, "scsidisk", "lu_shared", luName)).thenReturn(null);
assertFalse(appliance.isLuShared(luName));
when(client.execute(IntegerNmsResponse.class, "scsidisk", "lu_shared", luName)).thenReturn(new IntegerNmsResponse(0));
assertFalse(appliance.isLuShared(luName));
when(client.execute(IntegerNmsResponse.class, "scsidisk", "lu_shared", luName)).thenReturn(new IntegerNmsResponse(1));
assertTrue(appliance.isLuShared(luName));
final String error = String.format(ZVOL_DOES_NOT_EXISTS_ERROR, luName);
when(client.execute(IntegerNmsResponse.class, "scsidisk", "lu_shared", luName)).thenThrow(new CloudRuntimeException(error));
assertFalse(appliance.isLuShared(luName));