'test create_cloned_volume
check if calls the appropriate xiv_backend functions
are being called'

@mock.patch('cinder.volume.utils.group_get_by_id', mock.MagicMock())
@mock.patch('cinder.volume.utils.is_group_a_cg_snapshot_type', mock.MagicMock(return_value=False))
def test_create_cloned_volume_calls_vol_create_and_copy(self):

    driver = mock.MagicMock()
    driver.VERSION = 'VERSION'
    p = self.proxy(self.default_storage_info, mock.MagicMock(), test_mock.cinder.exception, driver)
    vol_src = testutils.create_volume(self.ctxt, display_name='bla', size=17)
    vol_trg = testutils.create_volume(self.ctxt, display_name='bla', size=17)
    p.ibm_storage_cli = mock.MagicMock()
    p._cg_name_from_volume = mock.MagicMock(return_value='cg')
    p.create_cloned_volume(vol_trg, vol_src)
    p._create_volume = test_mock.MagicMock()
    p.ibm_storage_cli.cmd.vol_create.assert_called_once_with(pool='WTF32', size_blocks=storage.gigabytes_to_blocks(17), vol=vol_trg['name'])
    p.ibm_storage_cli.cmd.vol_copy.assert_called_once_with(vol_src=vol_src['name'], vol_trg=vol_trg['name'])
