private ThrowingInterceptor(InvocationOnMock invocation) {
this.invocation = invocation;
}
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
if (new ObjectMethodsGuru().isToString(method)) {
return "SmartNull returned by this unstubbed method call on a mock:\n" +
invocation.toString();
}
new Reporter().smartNullPointerException(invocation.toString(), location);