}
return null;
}
});
Invocation invocation = new InvocationImpl(interceptionObject, new DelegatingMethod(method), arguments,
SequenceNumber.next(), cglibProxyRealMethod) {
private static final long serialVersionUID = -3679957412502758558L;
public String toString() {
return new ToStringGenerator().generate(getMock(), getMethod(), getArguments());
}
};
try {
return replaceMatchersBinderIfNeeded(mockHandler).handle(invocation);
} catch (NotAMockException e) {
if(invocation.getMock().getClass().getName().startsWith("java.") && MockRepository.getInstanceMethodInvocationControl(invocation.getMock()) != null) {
return invocation.callRealMethod();
} else {
throw e;
}
} catch (MockitoAssertionError e) {
InvocationControlAssertionError.updateErrorMessageForMethodInvocation(e);