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 unstubbed " + invocation.getMethod().getName() + "() method on mock";
}
new Reporter().smartNullPointerException(location);
return null;