* Tests if the JPA entities (Team, Player) have been created correctly.
*/
@Test
public final void testEntities() {
Query q = em.createQuery("select p from Player p where p.firstName='All' and p.lastName='Star'");
Player allstar = (Player)q.getSingleResult();
Assert.assertEquals("AllStar", allstar.getFirstName() + allstar.getLastName());
Assert.assertEquals(2, allstar.getTeams().size());
Assert.assertEquals(3, allstar.getTeams().iterator().next().getPlayers().size());
}