### Question:
RepositoryTagServiceImpl implements RepositoryTagService { @Override public Optional<RepositoryTag> find(Integer repositoryId, String version) { return repositoryTagDao.findByRepositoryIdAndVersion(repositoryId, version); }  @Override Optional<RepositoryTag> find(Integer repositoryId, String version); @Override Optional<RepositoryTag> findLatestTag(Integer repositoryId);  }### Answer:
@Test public void find_no_data() { Optional<RepositoryTag> repositoryTagOption = repositoryTagService.find(1, "0.1.0"); assertThat(repositoryTagOption).isEmpty(); }
@Test public void find_success() { RepositoryTag repositoryTag = new RepositoryTag(); repositoryTag.setRepositoryId(1); repositoryTag.setVersion("0.1.0"); repositoryTag.setGitTagId("i-am-a-git-tag"); repositoryTag.setCreateUserId(2); repositoryTag.setCreateTime(LocalDateTime.now()); repositoryTagDao.save(repositoryTag); Optional<RepositoryTag> repositoryTagOption = repositoryTagService.find(1, "0.1.0"); assertThat(repositoryTagOption).isPresent(); }