### Question:
EventContextImpl implements EventContext { @Override public void endTransaction(SagaRequest request, SagaResponse response) { sendMessage(request, new TransactionRecoveryMessage(response)); } EventContextImpl(RequestActorContext context); @Override void beginTransaction(SagaRequest request); @Override void endTransaction(SagaRequest request, SagaResponse response); @Override void abortTransaction(SagaRequest request, SagaResponse response); @Override void compensateTransaction(SagaRequest request, SagaResponse response);  }### Answer:
@Test public void sendTransactionRecoveryMessageToActor_OnTransactionEnd() throws Exception { new TestKit(actorSystem) {{ context.addActor(requestId, getRef()); eventContext.endTransaction(request, response); TransactionRecoveryMessage message = (TransactionRecoveryMessage) receiveOne(Duration.of(2, SECONDS)); assertThat(message.response(), is(response)); }}; }