Can someone explain why String and Class annotation parameters are expected differently? Why does the compiler require literals for Classes, wherby accepting constants for Strin
Look this:
public static final Class TEST_EXCEPTION = RuntimeException.class;
The class should be a Throwable that the compiler is able to check. So, try this:
public static final Class extends Throwable> TEST_EXCEPTION = RuntimeException.class;