List<FavoriteTask> tasksToCopy = new ArrayList<FavoriteTask>();
tasksToCopy.add(favoriteTask1);
tasksToCopy.add(favoriteTask2);
//now perform the duplication, we only pass in one NameAndCommand but we're editing 2. This makes it cancel the second one.
editor.duplicateFavorites(tasksToCopy, new TestEditFavoriteInteraction(new NameAndCommand("newname1", "newcommand1")));
//there should be 4 tasks now
Assert.assertNotSame("Failed to cancel", 5, editor.getFavoriteTasks().size()); //this just provides a better error if this fails to cancel
Assert.assertEquals(4, editor.getFavoriteTasks().size());