private void checkRemoved(Task task2) {
checkRemoved(task2.getID());
}
private void checkRemoved(String id) {
final TaskFetcher taskFetcher = new TaskFetcher(em);
jpa.begin();
taskFetcher.deleteTasksWithID(id);
jpa.commit();
try {
taskFetcher.fetchTaskIfExists(id);
Assert.fail("No task should be left here");
} catch (Exception expected) {
// this is good.
}
}