An annotation is structured metadata attached to a program element. Language processors and tools can inspect it to recognize intended behavior, configure processing, or report mistakes. section 1.3.2 section 10.7
A missing test annotation disables the test
public void parsesInput() { // assertions } Without @Test, a test framework may never execute this method. The dangerous result is a test suite that appears complete while silently omitting coverage. The same failure can arise from importing an annotation from the wrong framework, such as JUnit instead of TestNG. section 10.7
Avoid annotation-related failures by checking:
- Whether the required annotation is present and imported from the intended framework. section 10.7
- Whether the annotated declaration satisfies the framework’s visibility, static, return-type, nesting, naming, and parameter requirements. section 10.7
- Whether a static analyzer understands the annotation; custom annotations may be needed to describe application methods, and analyzers may require configuration or extensions. section 1.3.2
Figure 10.2 Malformed test methods have no Run gutter icon.
Use the missing Run gutter icon as a practical signal that a test method may be malformed or undiscovered. section 10.7

























