### Question:
ForumStructureItem { public Entity getItem() { return item; } ForumStructureItem();  ForumStructureItem(@Nullable Entity item); Entity getItem(); boolean isBranch(); boolean isSection(); boolean isPersisted(); PoulpeBranch getBranchItem(); PoulpeSection getSectionItem(); ForumStructureItem prepareBranchItemForEditing(boolean createNew); ForumStructureItem prepareSectionItemForEditing(boolean createNew); T getItem(@Nonnull Class<T> itemClass); @Override String toString(); String getDraggableId(); String getDroppableId(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testGetItem_withNull() throws Exception { assertNull(new ForumStructureItem().getItem(PoulpeBranch.class)); }
@Test public void testGetItem() throws Exception { PoulpeSection section = new PoulpeSection(); ForumStructureItem item = new ForumStructureItem(section); assertSame(item.getItem(PoulpeSection.class), section); }
@Test(expectedExceptions = ClassCastException.class) public void testGetItem_withWrongClass() throws Exception { PoulpeSection section = new PoulpeSection(); ForumStructureItem item = new ForumStructureItem(section); assertSame(item.getItem(PoulpeBranch.class), section); }