### Question:
SagaStartAnnotationProcessor { public void postIntercept(String parentTxId) { AlphaResponse response = sender .send(new SagaEndedEvent(omegaContext.globalTxId(), omegaContext.localTxId())); if (response.aborted()) { throw new OmegaException("transaction " + parentTxId + " is aborted"); } } SagaStartAnnotationProcessor(OmegaContext omegaContext, SagaMessageSender sender); AlphaResponse preIntercept(int timeout); void postIntercept(String parentTxId); void onError(String compensationMethod, Throwable throwable);  }### Answer:
@Test public void sendsSagaEndedEvent() { sagaStartAnnotationProcessor.postIntercept(null); TxEvent event = messages.get(0); assertThat(event.globalTxId(), is(globalTxId)); assertThat(event.localTxId(), is(globalTxId)); assertThat(event.parentTxId(), is(nullValue())); assertThat(event.compensationMethod().isEmpty(), is(true)); assertThat(event.type(), is(EventType.SagaEndedEvent)); assertThat(event.payloads().length, is(0)); }