@Test
public void interruptsOnCompensableTimeoutExceptionWithWaitBlocked() throws Throwable {

  when(compensable.forwardTimeout()).thenReturn(2);
  when(joinPoint.proceed()).thenAnswer(new Answer<Object>() {
    @Override
    public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
      Thread.currentThread().wait(5000);
      return null;
    }
  });
  try {
    aspect.advise(joinPoint, compensable);
  } catch (RuntimeException e) {
    assertThat(e, instanceOf(TransactionTimeoutException.class));
    assertThat(e.getCause(), instanceOf(IllegalMonitorStateException.class));
  }
}