'Error case where specified LV snapshot doesn\'t exist.
This test case ensures that the correct exception is raised when
the caller attempts to manage a snapshot that does not exist.'

def test_lvm_manage_existing_snapshot_bad_ref(self):

    self._setup_stubs_for_manage_existing()
    ref = {'source-name': 'fake_nonexistent_lv'}
    snp = {'name': 'test', 'id': fake.SNAPSHOT_ID, 'size': 0, 'status': 'available'}
    with mock.patch.object(self.volume.driver.vg, 'get_volume', self._get_manage_existing_lvs):
        self.assertRaises(exception.ManageExistingInvalidReference, self.volume.driver.manage_existing_snapshot_get_size, snp, ref)
