Player player1 = new Player(0, "player1", Gender.MALE); //$NON-NLS-1$
dynasty.addPlayer(player1);
Player player2 = new Player(1, "player2", Gender.FEMALE); //$NON-NLS-1$
dynasty.addPlayer(player2);
PlayerService service = new PlayerServiceImpl();
assertNotNull(service.getAllPlayers());
assertEquals(service.getDynasty(user), null);
service.setDynastyForUser(dynasty, user);
assertTrue(service.getDynasty(user) == dynasty);
List<Player> players = service.getPlayers(user);
assertNotNull(players);
assertEquals(2, players.size());
assertTrue(players.contains(player1));
assertTrue(players.contains(player2));
service.setDynastyForUser(dynasty2, user2);
List<Dynasty> allDynasties = service.getAllDynasties();
assertEquals(2, allDynasties.size());
assertTrue(allDynasties.contains(dynasty));
assertTrue(allDynasties.contains(dynasty2));
}