### Question:
ApiRepoVersionServiceImpl implements ApiRepoVersionService { @Override public Optional<ApiRepoVersion> findById(Integer apiRepoVersionId) { return apiRepoVersionDao.findById(apiRepoVersionId); }  @Override Optional<ApiRepoVersion> findById(Integer apiRepoVersionId); @Override Optional<ApiRepoVersion> findLatestStableVersion(Integer apiRepoId); @Override Optional<ApiRepoVersion> findMasterVersion(Integer apiRepoId);  }### Answer:
@Test public void findById_no_data() { assertThat(apiRepoVersionService.findById(1)).isEmpty(); }
@Test public void findById_success() { ApiRepoVersion version = new ApiRepoVersion(); version.setApiRepoId(1); version.setName("a api repo"); version.setVersion("0.1.0"); version.setGitTagName("v0.1.0"); version.setCreateUserId(1); version.setCreateTime(LocalDateTime.now()); version.setLastPublishTime(LocalDateTime.now()); ApiRepoVersion savedVersion = apiRepoVersionDao.save(version); assertThat(apiRepoVersionService.findById(savedVersion.getId())).isPresent(); }