@Test
public void updateByPrimaryKeySelective() throws Exception {

  TeamMember teamMember = new TeamMember();
  teamMember.setTeamName("submarine");
  teamMember.setInviter(0);
  teamMember.setMember("admin");
  teamMember.setCreateBy("createByteamMember");
  Team team = new Team();
  team.setTeamName("submarine");
  team.setOwner("test_sub");
  team.setCreateBy("createByteam");
  List list = new ArrayList<TeamMember>();
  list.add(teamMember);
  team.setCollaborators(list);
  Boolean ret = teamService.add(team);
  assertTrue(ret);
  team.setTeamName("submarine_update");
  team.setUpdateBy("submarine_user_update");
  TeamMember teamMemberUpdate = new TeamMember();
  teamMemberUpdate.setTeamName("submarine");
  teamMemberUpdate.setInviter(0);
  teamMemberUpdate.setMember("test_member");
  teamMemberUpdate.setCreateBy("createByteamMember2");
  list.add(teamMemberUpdate);
  boolean editRet = teamService.updateByPrimaryKeySelective(team);
  assertTrue(editRet);
  List<Team> teamList = teamService.queryPageList("test_sub", "create_time", "desc", 0, 100);
  assertEquals(teamList.size(), 1);
  Team teamDb = teamList.get(0);
  assertEquals(team.getTeamName(), teamDb.getTeamName());
  List<TeamMember> teamMemberList = teamDb.getCollaborators();
  assertEquals(teamMemberList.size(), 2);
  for (TeamMember member : teamMemberList) {
    assertEquals(member.getTeamName(), team.getTeamName());
    assertEquals(team.getUpdateBy(), teamDb.getUpdateBy());
  }
  LOG.info("team.UpdateTime:{}", teamDb.getUpdateTime());
}