### Question:
ForumStructureItem { public PoulpeSection getSectionItem() { return (PoulpeSection) 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 testGetItemAsSection() throws Exception { PoulpeSection branch = new PoulpeSection(); ForumStructureItem item = new ForumStructureItem(branch); assertSame(item.getSectionItem(), branch); }
@Test(expectedExceptions = ClassCastException.class) public void testGetItemAsSection_isNotSection() throws Exception { ForumStructureItem item = new ForumStructureItem(new PoulpeBranch()); item.getSectionItem(); }
@Test public void testGetItemAsSection_isNull() throws Exception { assertNull(new ForumStructureItem().getSectionItem()); }