// given
int size = wrap(toDoItems).notYetComplete().size();
nextTransaction();
// when
final ToDoItem newToDo = toDoItems.newToDo("new todo", ToDoItem.Category.Professional, ToDoItem.Subcategory.OpenSource, null, null);
nextTransaction();
// then
assertThat(newToDo.getDescription(), is("new todo"));
assertThat(newToDo.getCategory(), is(ToDoItem.Category.Professional));
assertThat(wrap(toDoItems).notYetComplete().size(), is(size+1));
assertThat(container().isPersistent(newToDo), is(true));
assertThat(container().isPersistent(wrap(newToDo)), is(true));
nextTransaction();
// when
newToDo.delete();
nextTransaction();
// then
assertThat(wrap(toDoItems).notYetComplete().size(), is(size));
}