protected void deleteTournamentAndCommit() {
   assertEquals(2, getLocalProject().getModelElements().size());
   RunESCommand.run(
       new Callable<Void>() {
         public Void call() throws Exception {
           final Tournament tournament =
               getLocalProject().getAllModelElementsByClass(Tournament.class).iterator().next();
           getLocalProject().getModelElements().remove(tournament);
           return null;
         }
       });
   commit();
   assertEquals(1, getLocalProject().getModelElements().size());
 }
  private void createPlayerAndTournamentAndCommit() {
    final Player player = BowlingFactory.eINSTANCE.createPlayer();
    player.setName("player");
    final Tournament tournament = BowlingFactory.eINSTANCE.createTournament();
    tournament.getPlayerPoints().put(player, 32);

    RunESCommand.run(
        new Callable<Void>() {
          public Void call() throws Exception {
            getLocalProject().getModelElements().add(player);
            getLocalProject().getModelElements().add(tournament);
            return null;
          }
        });
    commit();
  }