@Test
public void clearContextOnTccStartError() throws Throwable {

  RuntimeException oops = new RuntimeException("oops");
  when(joinPoint.proceed()).thenThrow(oops);
  try {
    aspect.advise(joinPoint, tccStart);
    expectFailing(RuntimeException.class);
  } catch (RuntimeException e) {
    assertThat(e, is(oops));
  }
  assertThat(startedEvents.size(), is(1));
  TccStartedEvent event = startedEvents.get(0);
  assertThat(event.getGlobalTxId(), is(globalTxId));
  assertThat(event.getLocalTxId(), is(globalTxId));
  
  TccEndedEvent endedEvent = endedEvents.get(0);
  assertThat(endedEvent.getGlobalTxId(), is(globalTxId));
  assertThat(endedEvent.getLocalTxId(), is(globalTxId));
  assertThat(endedEvent.getStatus(), is(TransactionStatus.Failed));
  assertThat(omegaContext.globalTxId(), is(nullValue()));
  assertThat(omegaContext.localTxId(), is(nullValue()));
}