}
@Test(expected = NoResultException.class)
public void insertAndDeleteStandingsHistoryTest() {
final List<Team> teams = new ArrayList<Team>();
Team team = createTeam("Olympique Marseille", 1);
teams.add(team);
em.getTransaction().begin();
teamService.insertTeams(teams);
em.getTransaction().commit();
final Date matchDay = new Date();
team = teamService.findAllTeams().get(0);
final StandingsHistory standingsHistory = createStandingsHistory(team, matchDay);
standingsHistoryService.insertStandingsHistory(standingsHistory);
StandingsHistory result = standingsHistoryService.findStandingsHistoryByTeamAndDate(team, matchDay);
Assert.assertNotNull(result);
Assert.assertEquals(team.getId(), result.getTeam().getId());
// DELETE
em.getTransaction().begin();
standingsHistoryService.removeAllStandingsHistory();
em.getTransaction().commit();