### Question:
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);  }### Answer:
@Test public void testProceedOk() { try { when(proceedingJoinPoint.proceed()).thenReturn("result"); underTest.proceed(proceedingJoinPoint); } catch (Throwable throwable) { } }
@Test public void testProceedNotRuntimeExceptionOccured() { try { when(proceedingJoinPoint.proceed()).thenThrow(new SQLException("wrong")); assertThrows(AccessDeniedException.class, () -> underTest.proceed(proceedingJoinPoint)); } catch (Throwable throwable) { } }
@Test public void testProceedRuntimeExceptionOccured() throws Exception { try { when(proceedingJoinPoint.proceed()).thenThrow(new NullPointerException("wrong")); assertThrows(NullPointerException.class, () -> underTest.proceed(proceedingJoinPoint)); } catch (Throwable throwable) { } }