@mock.patch.object(rest_client.KioxiaProvisioner, 'clone_volume')
def test_create_cloned_volume_success(self, mock_clone_volume):
    testvol = _stub_volume()
    mock_clone_volume.return_value = success_prov_response
    result = self.driver.create_cloned_volume(testvol, testvol)
    (args, kwargs) = mock_clone_volume.call_args
    mock_call = args[0]
    self.assertEqual(mock_call.alias, testvol['name'])
    self.assertEqual(mock_call.capacity, testvol['size'])
    self.assertEqual(mock_call.volumeId, testvol['id'])
    self.assertEqual(mock_call.sourceVolumeId, testvol['id'])
    self.assertIsNone(result)
@mock.patch.object(rest_client.KioxiaProvisioner, 'clone_volume')
def test_create_cloned_volume_success(self, mock_clone_volume):
    testvol = _stub_volume()
    mock_clone_volume.return_value = success_prov_response
    result = self.driver.create_cloned_volume(testvol, testvol)
    (args, kwargs) = mock_clone_volume.call_args
    mock_call = args[0]
    self.assertEqual(mock_call.alias, testvol['name'])
    self.assertEqual(mock_call.capacity, testvol['size'])
    self.assertEqual(mock_call.volumeId, testvol['id'])
    self.assertEqual(mock_call.sourceVolumeId, testvol['id'])
    self.assertIsNone(result)