@Test public void testProceedRuntimeExceptionOccured() throws Exception { try { when(proceedingJoinPoint.proceed()).thenThrow(new NullPointerException("wrong")); assertThrows(NullPointerException.class, () -> underTest.proceed(proceedingJoinPoint)); } catch (Throwable throwable) { } }
public Object proceed(ProceedingJoinPoint proceedingJoinPoint) { try { return proceedingJoinPoint.proceed(); } catch (Error | RuntimeException unchecked) { throw unchecked; } catch (Throwable t) { throw new AccessDeniedException(t.getMessage(), t); } }
ReflectionUtil { public Object proceed(ProceedingJoinPoint proceedingJoinPoint) { try { return proceedingJoinPoint.proceed(); } catch (Error | RuntimeException unchecked) { throw unchecked; } catch (Throwable t) { throw new AccessDeniedException(t.getMessage(), t); } } }
ReflectionUtil { public Object proceed(ProceedingJoinPoint proceedingJoinPoint) { try { return proceedingJoinPoint.proceed(); } catch (Error | RuntimeException unchecked) { throw unchecked; } catch (Throwable t) { throw new AccessDeniedException(t.getMessage(), t); } }  }
ReflectionUtil { public Object proceed(ProceedingJoinPoint proceedingJoinPoint) { try { return proceedingJoinPoint.proceed(); } catch (Error | RuntimeException unchecked) { throw unchecked; } catch (Throwable t) { throw new AccessDeniedException(t.getMessage(), t); } }  Optional<Object> getParameter(ProceedingJoinPoint proceedingJoinPoint, MethodSignature methodSignature, Class annotation); Object proceed(ProceedingJoinPoint proceedingJoinPoint); }
ReflectionUtil { public Object proceed(ProceedingJoinPoint proceedingJoinPoint) { try { return proceedingJoinPoint.proceed(); } catch (Error | RuntimeException unchecked) { throw unchecked; } catch (Throwable t) { throw new AccessDeniedException(t.getMessage(), t); } }  Optional<Object> getParameter(ProceedingJoinPoint proceedingJoinPoint, MethodSignature methodSignature, Class annotation); Object proceed(ProceedingJoinPoint proceedingJoinPoint);  }