assertEquals("Size Unexpected", 0, section.getAssociatedItems().size()); assertNull("Section Unexpected", item.getSection());
assertEquals("Size Unexpected", 2, section.getAssociatedItemsCount()); assertNull("Section Unexpected", item.getSection());   assertEquals("Order Unexpected", 0, item2.getItemOrder().intValue()); assertEquals("Order Unexpected", 1, item3.getItemOrder().intValue()); assertEquals("Order Unexpected", 0, section.getAssociatedItems(0).getItemOrder().intValue()); assertEquals("Order Unexpected", 1, section.getAssociatedItems(1).getItemOrder().intValue());   try { item2.delete();  } catch (DomainException e) { assertEquals("Size Unexpected", 2, section.getAssociatedItemsCount()); }  assertEquals("Size Unexpected", 1, section.getAssociatedItemsCount()); assertNull("Section Unexpected", item2.getSection());   assertEquals("Order Unexpected", 0, item3.getItemOrder().intValue()); assertEquals("Order Unexpected", 0, section.getAssociatedItems(0).getItemOrder().intValue());   try { item3.delete();  } catch (DomainException e) { assertEquals("Size Unexpected", 1, section.getAssociatedItemsCount()); }  assertEquals("Size Unexpected", 0, section.getAssociatedItemsCount()); assertNull("Section Unexpected", item3.getSection());
    public void testDeleteItem() {                section.getAssociatedItems().add(item);                  try {            item.deleteItem();                    } catch (notAuthorizedServiceDeleteException e) {            assertEquals("Size Unexpected", 1, section.getAssociatedItems().size());        }                assertEquals("Size Unexpected", 0, section.getAssociatedItems().size());        assertNull("Section Unexpected", item.getSection());    }