### Question:
RestartRunDao extends NamedParameterJdbcDaoSupport { public Integer countPipelineRestartRuns(Long restartingRunId) { Assert.isTrue(!Objects.isNull(restartingRunId), "Restarting Run ID is required"); return getJdbcTemplate().queryForObject(countPipelineRestartRunQuery, Integer.class, restartingRunId); }  @Transactional(propagation = Propagation.MANDATORY) void createPipelineRestartRun(RestartRun restartRun); Integer countPipelineRestartRuns(Long restartingRunId); RestartRun loadPipelineRestartedRunForParentRun(Long parentRunId); List<RestartRun> loadAllRestartedRuns(); List<RestartRun> loadAllRestartedRunsForInitialRun(Long runId); @Transactional(propagation = Propagation.MANDATORY) void deleteRestartedRunsForPipeline(Long pipelineId); @Required void setCreatePipelineRestartRunQuery(String createPipelineRestartRunQuery); @Required void setCountPipelineRestartRunQuery(String countPipelineRestartRunQuery); @Required void setLoadPipelineRestartedRunForParentRunQuery(String loadPipelineRestartedRunForParentRunQuery); @Required void setLoadAllRestartedRunsQuery(String loadAllRestartedRunsQuery); @Required void setLoadAllRestartedRunsForInitialRunQuery(String loadAllRestartedRunsForInitialRunQuery); @Required void setDeleteRestartedRunsByPipelineQuery(String deleteRestartedRunsByPipelineQuery);  }### Answer:
@Test public void testCountPipelineRestartRuns() { restartRunDao.createPipelineRestartRun(restartRun1); restartRunDao.createPipelineRestartRun(restartRun2); restartRunDao.createPipelineRestartRun(restartRun4); int countRuns = restartRunDao.countPipelineRestartRuns(restartRun3.getParentRunId()); assertEquals(2, countRuns); }