### Question:
PipelineExecutionListener implements PipelineEventListener { @Override public void beforeStageExecution(BeforeStageExecutionEvent bsee) { stageStatusChangeEvent.fire(new StageStatusChangeEvent(new PipelineExecutionTraceKey(bsee.getExecutionId()), bsee.getStage().getName(), PipelineStatus.RUNNING)); } PipelineExecutionListener(); @Inject  PipelineExecutionListener(final Event<PipelineStatusChangeEvent> pipelineStatusChangeEvent,
                                     final Event<StageStatusChangeEvent> stageStatusChangeEvent); @Override void beforePipelineExecution(BeforePipelineExecutionEvent bpee); @Override void afterPipelineExecution(AfterPipelineExecutionEvent apee); @Override void beforeStageExecution(BeforeStageExecutionEvent bsee); @Override void onStageError(OnErrorStageExecutionEvent oesee); @Override void afterStageExecution(AfterStageExecutionEvent asee); @Override void onPipelineError(OnErrorPipelineExecutionEvent oepee);  }### Answer:
@Test public void testBeforeStageExecution() { listener.beforeStageExecution(new BeforeStageExecutionEvent(EXECUTION_ID, pipeline, stage)); verify(stageStatusChangeEvent, times(1)).fire(new StageStatusChangeEvent(traceKey, STAGE_NAME, PipelineStatus.RUNNING)); }