@Test public void shouldNotDropCommandCompletely() { final RemoveFromList toRepair1 = new RemoveFromList(SOME_LIST, SOME_CHANGE, 2, 4); final RemoveFromList repairAgainst1 = new RemoveFromList(SOME_LIST, SOME_CHANGE, 2, 4); final List<RemoveFromList> repaired1 = cut.repairCommand(toRepair1, repairAgainst1); assertThat(repaired1).hasSize(1); positionAndCountEquals(repaired1.get(0), 0, 0); final RemoveFromList toRepair2 = new RemoveFromList(SOME_LIST, SOME_CHANGE, 2, 4); final RemoveFromList repairAgainst2 = new RemoveFromList(SOME_LIST, SOME_CHANGE, 0, 20); final List<RemoveFromList> repaired2 = cut.repairCommand(toRepair2, repairAgainst2); assertThat(repaired2).hasSize(1); positionAndCountEquals(repaired2.get(0), 0, 0); }
public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final AddToList repairAgainst) { return repairAddOrReplace(toRepair, repairAgainst.getPosition()); }
RemoveFromListRepairer { public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final AddToList repairAgainst) { return repairAddOrReplace(toRepair, repairAgainst.getPosition()); } }
RemoveFromListRepairer { public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final AddToList repairAgainst) { return repairAddOrReplace(toRepair, repairAgainst.getPosition()); }  }
RemoveFromListRepairer { public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final AddToList repairAgainst) { return repairAddOrReplace(toRepair, repairAgainst.getPosition()); }  List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final AddToList repairAgainst); List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final RemoveFromList repairAgainst); List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final ReplaceInList repairAgainst); }
RemoveFromListRepairer { public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final AddToList repairAgainst) { return repairAddOrReplace(toRepair, repairAgainst.getPosition()); }  List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final AddToList repairAgainst); List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final RemoveFromList repairAgainst); List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final ReplaceInList repairAgainst);  }