### Question:
UserBindServiceImpl implements UserBindService { @Override public Optional<UserBind> findBySiteAndOpenId(OauthSite site, String openId) { return userBindDao.findBySiteAndOpenId(site, openId); }  @Override Optional<UserBind> findBySiteAndOpenId(OauthSite site, String openId);  }### Answer:
@Test public void find_by_site_and_openid_no_data() { assertThat(userBindService.findBySiteAndOpenId(OauthSite.GITHUB, "1")).isEmpty(); }
@Test public void find_by_site_and_openid_success() { UserBind userBind = new UserBind(); userBind.setCreateTime(LocalDateTime.now()); userBind.setSite(OauthSite.GITHUB); userBind.setOpenId("2"); userBind.setUserId(1); userBindDao.save(userBind); assertThat(userBindService.findBySiteAndOpenId(OauthSite.GITHUB, "2")).isPresent(); }