Adds a test for annotate invalidation.