### Question:
TccStartAnnotationProcessor { public AlphaResponse preIntercept(String parentTxId, String methodName, int timeout) { try { return tccMessageSender.tccTransactionStart(new TccStartedEvent(omegaContext.globalTxId(), omegaContext.localTxId())); } catch (OmegaException e) { throw new TransactionalException(e.getMessage(), e.getCause()); } } TccStartAnnotationProcessor(OmegaContext omegaContext, TccMessageSender tccMessageSender); AlphaResponse preIntercept(String parentTxId, String methodName, int timeout); void postIntercept(String parentTxId, String methodName); void onError(String parentTxId, String methodName, Throwable throwable);  }### Answer:
@Test public void testSendTccStartEvent() { AlphaResponse result = tccStartAnnotationProcessor .preIntercept(null, "TccStartMethod", 0); TccStartedEvent event = startedEvents.get(0); assertThat(event.getGlobalTxId(), is(globalTxId)); assertThat(event.getLocalTxId(), is(globalTxId)); assertThat(result, is(response)); }
@Test public void testSendTccStartEventFailed() { throwException = true; try { tccStartAnnotationProcessor .preIntercept(null, "TccStartMethod", 0); expectFailing(TransactionalException.class); } catch (TransactionalException e) { Assert.assertThat(e.getMessage(), Is.is("exception")); Assert.assertThat(e.getCause(), instanceOf(RuntimeException.class)); Assert.assertThat(e.getCause().getMessage(), Is.is("runtime exception")); } }