@Test
public void queryPageList() 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);
  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());
  assertEquals(team.getOwner(), teamDb.getOwner());
  assertEquals(team.getCreateBy(), teamDb.getCreateBy());
  assertEquals(teamDb.getCollaborators().size(), 1);
  TeamMember teamMemberDb = teamDb.getCollaborators().get(0);
  assertEquals(team.getId(), teamMemberDb.getTeamId());
  assertEquals(teamMember.getTeamName(), teamMemberDb.getTeamName());
  assertEquals(teamMember.getInviter(), teamMemberDb.getInviter());
  assertEquals(teamMember.getMember(), teamMemberDb.getMember());
  assertEquals(teamMember.getCreateBy(), teamMemberDb.getCreateBy());
}