@Test
public void sendsTxAbortedEventOnError() throws Exception {

  interceptor.onError(parentTxId, compensationMethod, new RuntimeException("oops"));
  TxEvent event = messages.get(0);
  assertThat(event.globalTxId(), is(globalTxId));
  assertThat(event.localTxId(), is(localTxId));
  assertThat(event.parentTxId(), is(parentTxId));
  assertThat(event.type(), is(EventType.TxAbortedEvent));
  assertThat(event.compensationMethod(), is(compensationMethod));
}