### Question:
ReindexJobStepExecutionListener implements StepExecutionListener { @Override public void beforeStep(StepExecution stepExecution) { SourceCode sc = EnumUtils.getEnum(SourceCode.class, sourceCode); judgmentRepository.markAsNotIndexedBySourceCode(sc); String deletingQuery = (sc == null) ? "*:*" : JudgmentIndexField.SOURCE_CODE.getFieldName() + ":" + sc.name(); try { solrJudgmentsServer.deleteByQuery(deletingQuery); } catch (SolrServerException | IOException e) { throw new RuntimeException(e); } }  @Override void beforeStep(StepExecution stepExecution); @Override ExitStatus afterStep(StepExecution stepExecution); void setSourceCode(String sourceCode); @Autowired void setJudgmentRepository(JudgmentRepository judgmentRepository); @Autowired @Qualifier("solrJudgmentsServer") void setSolrJudgmentsServer(SolrServer solrJudgmentsServer);  }### Answer:
@Test public void beforeStep_ALL_JUDGMENTS() throws Exception { reindexJobStepExecutionListener.beforeStep(new StepExecution("stepName", new JobExecution(1L))); verify(judgmentRepository, times(1)).markAsNotIndexedBySourceCode(null); verify(judgmentSolrServer).deleteByQuery("*:*"); verifyNoMoreInteractions(judgmentRepository, judgmentSolrServer); }