@Test
public void setNewLocalTxIdCompensableWithTransactionContext() throws Throwable {

  // setup the argument class
  when(joinPoint.getArgs()).thenReturn(new Object[]{transactionContextProperties});
  aspect.advise(joinPoint, compensable);
  assertThat(messages.size(), is(2));
  TxEvent startedEvent = messages.get(0);
  assertThat(startedEvent.globalTxId(), is(transactionGlobalTxId));
  assertThat(startedEvent.localTxId(), is(newLocalTxId));
  assertThat(startedEvent.parentTxId(), is(transactionLocalTxId));
  assertThat(startedEvent.type(), is(EventType.TxStartedEvent));
  assertThat(startedEvent.forwardRetries(), is(0));
  assertThat(startedEvent.retryMethod().isEmpty(), is(true));
  TxEvent endedEvent = messages.get(1);
  assertThat(endedEvent.globalTxId(), is(transactionGlobalTxId));
  assertThat(endedEvent.localTxId(), is(newLocalTxId));
  assertThat(endedEvent.parentTxId(), is(transactionLocalTxId));
  assertThat(endedEvent.type(), is(EventType.TxEndedEvent));
  assertThat(omegaContext.globalTxId(), is(transactionGlobalTxId));
  assertThat(omegaContext.localTxId(), is(transactionLocalTxId));
}