### Question:
EventContextImpl implements EventContext { @Override public void compensateTransaction(SagaRequest request, SagaResponse response) { sendMessage(request, new CompensationRecoveryMessage()); } 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 sendCompensationRecoveryMessageToActor_OnCompensationEnd() throws Exception { new TestKit(actorSystem) {{ context.addActor(requestId, getRef()); eventContext.compensateTransaction(request, response); expectMsgClass(CompensationRecoveryMessage.class); }}; }