fixed testing of annotations when replacing to use assert_raises to test...

... for keys that have been removed.

Discussed with @cbare the right way to do this!