Assert.assertEquals(3, result.size());
}
@Test
public void updateTeamTest() {
final Team team1 = createTeam("FC Sion", 1);
final List<Team> teams = new ArrayList<Team>();
teams.add(team1);
em.getTransaction().begin();
teamService.insertTeams(teams);
em.getTransaction().commit();
// update team name
team1.setName("Manchester United");
em.getTransaction().begin();
teamService.updateTeam(team1);
em.getTransaction().commit();
final List<Team> result = teamService.findAllTeams();