### Question:
AroundAdvice { boolean isCalled() { return called; }  void reset(); @Around("execution(* *(..))") Object trace(ProceedingJoinPoint proceedingJP);  }### Answer:
@Test(expected = RuntimeException.class) public void aroundAdviceIsCalledIfExceptionIsThrown() { assertFalse(aroundAspect.isCalled()); try { simpleService.throwsRuntimeException(); } finally { assertTrue(aroundAspect.isCalled()); } }
@Test public void aroundAdviceIsCalledIfValueIsReturned() { assertFalse(aroundAspect.isCalled()); assertThat(simpleService.returnsString(), equalTo("42")); assertTrue(aroundAspect.isCalled()); }
@Test public void aroundAdviceIsCalledForSimpleMethod() { assertFalse(aroundAspect.isCalled()); simpleService.doSomething(); assertTrue(aroundAspect.isCalled()); }