item.setSection(section); item2.setSection(section); item3.setSection(section);
try{ item2.edit(null, null, null, null); fail("Expected NullPointerException"); } catch(NullPointerException e){ assertEquals("Name Unexpected", "ItemName2", item2.getName()); assertEquals("Information Unexpected", "ItemInformation2", item2.getInformation()); }
    public void testEditItem() {        item.setSection(section);        item2.setSection(section);        item3.setSection(section);                        item2.edit("ItemName2New", "ItemInformation2New", false, 2);                assertEquals("Name Unexpected", "ItemName2New", item2.getName());        assertEquals("Information Unexpectfalseed", "ItemInformation2New", item2.getInformation());        assertEquals("Urgent Unexpected", false, item2.getUrgent().booleanValue());                // Test Organize Items Order        assertEquals("Order Unexpected", 0, item.getItemOrder().intValue());        assertEquals("Order Unexpected", 2, item2.getItemOrder().intValue());           assertEquals("Order Unexpected", 1, item3.getItemOrder().intValue());                   assertEquals("Order Unexpected", 0, section.getAssociatedItems(0).getItemOrder().intValue());        assertEquals("Order Unexpected", 2, section.getAssociatedItems(1).getItemOrder().intValue());           assertEquals("Order Unexpected", 1, section.getAssociatedItems(2).getItemOrder().intValue());                item2.edit("ItemName22New", "ItemInformation22New", false, 0);                assertEquals("Name Unexpected", "ItemName22New", item2.getName());        assertEquals("Information Unexpectfalseed", "ItemInformation22New", item2.getInformation());        assertEquals("Urgent Unexpected", false, item2.getUrgent().booleanValue());                // Test Organize Items Order        assertEquals("Order Unexpected", 1, item.getItemOrder().intValue());        assertEquals("Order Unexpected", 0, item2.getItemOrder().intValue());           assertEquals("Order Unexpected", 2, item3.getItemOrder().intValue());                   assertEquals("Order Unexpected", 1, section.getAssociatedItems(0).getItemOrder().intValue());        assertEquals("Order Unexpected", 0, section.getAssociatedItems(1).getItemOrder().intValue());           assertEquals("Order Unexpected", 2, section.getAssociatedItems(2).getItemOrder().intValue());                item2.edit("ItemName222New", "ItemInformation222New", true, 1);                assertEquals("Name Unexpected", "ItemName222New", item2.getName());        assertEquals("Information Unexpectfalseed", "ItemInformation222New", item2.getInformation());        assertEquals("Urgent Unexpected", true, item2.getUrgent().booleanValue());                // Test Organize Items Order        assertEquals("Order Unexpected", 0, item.getItemOrder().intValue());        assertEquals("Order Unexpected", 1, item2.getItemOrder().intValue());           assertEquals("Order Unexpected", 2, item3.getItemOrder().intValue());                   assertEquals("Order Unexpected", 0, section.getAssociatedItems(0).getItemOrder().intValue());        assertEquals("Order Unexpected", 1, section.getAssociatedItems(1).getItemOrder().intValue());           assertEquals("Order Unexpected", 2, section.getAssociatedItems(2).getItemOrder().intValue());    }