@Test public void withNestedException() { mapper.record(IllegalStateException.class).forwardTo(DEFAULT_REDIRECT); mapper.findByException(new RuntimeException(new IllegalStateException())).replay(result); verify(result).forwardTo(DEFAULT_REDIRECT); }
public void replay(Result result) { Object current = result; for (ExceptionRecorderParameter p : parameters) { current = new Mirror().on(current).invoke().method(p.getMethod()).withArgs(p.getArgs()); } }
ExceptionRecorder implements MethodInvocation<T> { public void replay(Result result) { Object current = result; for (ExceptionRecorderParameter p : parameters) { current = new Mirror().on(current).invoke().method(p.getMethod()).withArgs(p.getArgs()); } } }
ExceptionRecorder implements MethodInvocation<T> { public void replay(Result result) { Object current = result; for (ExceptionRecorderParameter p : parameters) { current = new Mirror().on(current).invoke().method(p.getMethod()).withArgs(p.getArgs()); } } ExceptionRecorder(Proxifier proxifier); }
ExceptionRecorder implements MethodInvocation<T> { public void replay(Result result) { Object current = result; for (ExceptionRecorderParameter p : parameters) { current = new Mirror().on(current).invoke().method(p.getMethod()).withArgs(p.getArgs()); } } ExceptionRecorder(Proxifier proxifier); @SuppressWarnings({ "unchecked", "rawtypes" }) Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod); void replay(Result result); }
ExceptionRecorder implements MethodInvocation<T> { public void replay(Result result) { Object current = result; for (ExceptionRecorderParameter p : parameters) { current = new Mirror().on(current).invoke().method(p.getMethod()).withArgs(p.getArgs()); } } ExceptionRecorder(Proxifier proxifier); @SuppressWarnings({ "unchecked", "rawtypes" }) Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod); void replay(Result result);  }