'Test enable_replication'

@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_replication.VolumeReplication.create_replication', mock.MagicMock())
@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_replication.GroupReplication.create_replication', mock.MagicMock())
@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.XIVProxy.get_group_specs_by_group_resource', mock.MagicMock(return_value=(TEST_GROUP_SPECS, '')))
@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.XIVProxy._get_target_params', mock.MagicMock(return_value=REPLICA_PARAMS))
@mock.patch('cinder.volume.drivers.ibm.ibm_storage.xiv_proxy.XIVProxy._get_target', mock.MagicMock(return_value='BLABLA'))
def test_enable_replication(self):

    driver = mock.MagicMock()
    driver.VERSION = 'VERSION'
    p = self.proxy(self.default_storage_info, mock.MagicMock(), test_mock.cinder.exception, driver)
    p.ibm_storage_cli = mock.MagicMock()
    p._call_remote_xiv_xcli = mock.MagicMock()
    p._update_consistencygroup = mock.MagicMock()
    p.targets = {'tgt1': 'info1'}
    group = self._create_test_group('WTF')
    vol = testutils.create_volume(self.ctxt)
    ret = p.enable_replication(self.ctxt, group, [vol])
    self.assertEqual(({'replication_status': fields.ReplicationStatus.ENABLED}, [{'id': vol['id'], 'replication_status': fields.ReplicationStatus.ENABLED}]), ret)
