The lack of, or insufficient, capability to create tests for class-file attributes was the impetus behind the effort to ensure javac creates a class-file's attributes completely and correctly. This suggests that even if some attributes are not used by the class-file, all class-files should be generated with a complete set of attributes. There also needs to be a way of testing that the class-files were created correctly, in regards to the file's attributes.
Prior to Java 9, there was no method of testing a class-file's attributes. Running a class and testing the code for anticipated or expected results were the most commonly used method of testing javac generated class-files. This technique falls short of testing to validate the file's attributes.
There are three categories of class-file attributes—attributes...