### Question:
PoulpeBranch extends Branch { public PoulpeSection removeFromSection() { PoulpeSection section = getPoulpeSection(); if (section != null) { section.deleteBranch(this); setSection(null); } return section; } PoulpeBranch();  PoulpeBranch(String name);  PoulpeBranch(String name, String description); PoulpeSection moveTo(@Nonnull PoulpeSection target); @NotNull(message = "{sections.moderating_group.not_null_constraint}") @Override Group getModeratorsGroup(); PoulpeSection getPoulpeSection(); @Override String toString(); PoulpeSection removeFromSection();  }### Answer:
@Test(dataProvider = "provideBranchWithSection") public void testRemoveFromSection(PoulpeBranch branch) throws Exception { PoulpeSection section = branch.removeFromSection(); assertNull(branch.getSection()); assertFalse(section.containsBranch(branch)); }
@Test public void removeFromSection_withNoSection_shouldDoNothing() throws Exception { PoulpeBranch branch = new PoulpeBranch(); assertNull(branch.removeFromSection()); }