### Question:
PoulpeSection extends Section { public void addBranchIfAbsentTo(int index, @Nullable PoulpeBranch branch) { List<PoulpeBranch> branches = getPoulpeBranches(); if (branch != null && !branches.contains(branch)) { branches.add(index, branch); branch.setSection(this); } } PoulpeSection();  PoulpeSection(String name);  PoulpeSection(String name, String description); @SuppressWarnings("unchecked") List<PoulpeBranch> getPoulpeBranches(); @Override String toString(); void clearBranches(); int getAmountOfBranches(); PoulpeBranch getBranch(int index); boolean containsBranch(@Nullable PoulpeBranch branch); PoulpeBranch getLastBranch(); void addBranchIfAbsent(@Nullable PoulpeBranch branch); void addBranchIfAbsentTo(int index, @Nullable PoulpeBranch branch);  }### Answer:
@Test(dataProvider = "provideFilledSection") public void testAddBranchIfAbsentTo(PoulpeSection section) { final int indexForAddedBranch = 1; List<PoulpeBranch> allBranches = section.getPoulpeBranches(); PoulpeBranch branchToAdd = new PoulpeBranch("", ""); PoulpeBranch branchToShift = allBranches.get(indexForAddedBranch); section.addBranchIfAbsentTo(1, branchToAdd); assertSame(branchToAdd, allBranches.get(indexForAddedBranch)); assertSame(branchToShift, allBranches.get(indexForAddedBranch + 1)); }