title: Detect RetentionPolicy.CLASS annotation in JUnit
body: <p>It is likely there is not a solution, but I hope I am wrong.</p>
  <p>I am writing a JUnit5 test to test some model classes. Some fields of the model classes are annotated by <a href="https://projectlombok.org/features/NonNull" rel="nofollow noreferrer">Lombok <code>@NonNull</code></a> which has CLASS level RetentionPolicy.</p>
  <p>I want to make sure the Java model classes always comply with some constraints described by a schema. The schema defines which fields are required and which are not. In JUnit test, I want to make sure all fields that are required are annotated by Lombok <code>@NonNull</code>.</p>
  <p>However, since the annotation is not a RUNTIME annotation, I do not have access to it in unit test.</p>
  <p>Are there any workaround that can achieve my goal to automatically verify the constraint?</p>