### Question:
CompensableInterceptor implements EventAwareInterceptor { @Override public void postIntercept(String parentTxId, String compensationMethod) { sender.send(new TxEndedEvent(context.globalTxId(), context.localTxId(), parentTxId, compensationMethod, context.category())); } CompensableInterceptor(OmegaContext context, MessageSender sender); @Override AlphaResponse preIntercept(String parentTxId, String compensationMethod, int timeout, String retriesMethod,
      int retries, Object... message); @Override void postIntercept(String parentTxId, String compensationMethod); @Override void onError(String parentTxId, String compensationMethod, Throwable throwable);  }### Answer:
@Test public void sendsTxEndedEventAfter() throws Exception { interceptor.postIntercept(parentTxId, compensationMethod); 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.TxEndedEvent)); assertThat(event.compensationMethod(), is(compensationMethod)); assertThat(event.payloads().length, is(0)); }