@Test
public void delete() 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);
  Boolean deleteRet = teamService.delete(team.getId());
  assertTrue(deleteRet);
  List<Team> teamList = teamService.queryPageList("test_sub",
      "create_time", "desc", 0, 100);
  assertEquals(teamList.size(), 0);
  TeamMemberService teamMemberService = new TeamMemberService();
  List<TeamMember> teamMemberList = teamMemberService.queryList(team.getId());
  assertEquals(teamMemberList.size(), 0);
}