I have a java class hierarchy that are formed by an Abstract class and N extensions of it. In the abstract class I have a method that is annotated with a @Remove annotation. While we won't get any exceptions of won't fail fast if this annotation is removed, we may get out of memory exceptions, so I would like to be sure that we notice as fast as possible if this annotation disappears in some refactoring.
I am trying to create GUTS (good unit tests), so I thought I could document this "technical requirement" in my tests, with a test case that states it.
But this is not a feature, it as an implementation detail and it is not linked to the behavior of the method (the method could be empty, but it has to exist and has to be annotated).
Is it ok to create a test for that or is there any other way to check the existence of this annotation?