InvocationContext { @Override public String toString() { if(null != this.method) { return this.method.getDeclaringClass().getName()+"."+this.method.getName(); } return null; } InvocationContext(Method method, Object[] parameters); Method getMethod(); Object[] getParameters(); @Override String toString();  }
@Test public void toStringTest() throws NoSuchMethodException { System.out.println("toString"); Method method = this.getClass().getMethod("testGetMethod"); InvocationContext instance = new InvocationContext(method, null); Object result = instance.toString(); assertThat(result).isEqualTo("org.ocelotds.security.InvocationContextTest.testGetMethod"); instance = new InvocationContext(null, null); result = instance.toString(); assertThat(result).isNull(); }