I\'m following this tutorial on Java annotaitons and implemented the Test annotation as shown there. But when running the code I get the following output.
java.l
The Method#invoke has the answer to your question:
public Object invoke(Object obj, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Throws: NullPointerException - if the specified object is null and the method is an instance method.
NullPointerException