@Test public void testEdit() { addTestRecipe(); Recipe expected = testRecipe; expected.setName("Edited Recipe"); svc.edit(expected); Recipe actual = null; List<Recipe> list = svc.getRecipeList(); for (Recipe recipe : list) { if (recipe.getId() == testRecipe.getId()) { actual = recipe; } } assertEquals(expected, actual); }