@Test public void firstRepairedLocalListVersionStartsFromToVersionOfRemoteCommand() { cut.repairLocalCommandsVersion(localCommands, someRemoteCommand); assertThat(localCommands).hasSize(3); assertThat(localCommands.poll().getListVersionChange().getFromVersion()).isEqualTo( someRemoteCommand.getListVersionChange().getToVersion()); }
public void repairLocalCommandsVersion(final Queue<ListCommand> localCommands, final ListCommand originalRemoteCommand) { localCommands.add(repairCommand(localCommands.poll(), originalRemoteCommand.getListVersionChange() .getToVersion(), randomUUID())); final int count = localCommands.size(); for (int i = 1; i < count; i++) { localCommands.add(repairCommand(localCommands.poll(), randomUUID(), randomUUID())); } }
ListCommandVersionRepairer { public void repairLocalCommandsVersion(final Queue<ListCommand> localCommands, final ListCommand originalRemoteCommand) { localCommands.add(repairCommand(localCommands.poll(), originalRemoteCommand.getListVersionChange() .getToVersion(), randomUUID())); final int count = localCommands.size(); for (int i = 1; i < count; i++) { localCommands.add(repairCommand(localCommands.poll(), randomUUID(), randomUUID())); } } }
ListCommandVersionRepairer { public void repairLocalCommandsVersion(final Queue<ListCommand> localCommands, final ListCommand originalRemoteCommand) { localCommands.add(repairCommand(localCommands.poll(), originalRemoteCommand.getListVersionChange() .getToVersion(), randomUUID())); final int count = localCommands.size(); for (int i = 1; i < count; i++) { localCommands.add(repairCommand(localCommands.poll(), randomUUID(), randomUUID())); } }  }
ListCommandVersionRepairer { public void repairLocalCommandsVersion(final Queue<ListCommand> localCommands, final ListCommand originalRemoteCommand) { localCommands.add(repairCommand(localCommands.poll(), originalRemoteCommand.getListVersionChange() .getToVersion(), randomUUID())); final int count = localCommands.size(); for (int i = 1; i < count; i++) { localCommands.add(repairCommand(localCommands.poll(), randomUUID(), randomUUID())); } }  void repairLocalCommandsVersion(final Queue<ListCommand> localCommands,
            final ListCommand originalRemoteCommand); List<? extends ListCommand> repairRemoteCommandVersion(
            final List<? extends ListCommand> indexRepairedRemoteCommands,
            final List<ListCommand> versionRepairedLocalCommands); }
ListCommandVersionRepairer { public void repairLocalCommandsVersion(final Queue<ListCommand> localCommands, final ListCommand originalRemoteCommand) { localCommands.add(repairCommand(localCommands.poll(), originalRemoteCommand.getListVersionChange() .getToVersion(), randomUUID())); final int count = localCommands.size(); for (int i = 1; i < count; i++) { localCommands.add(repairCommand(localCommands.poll(), randomUUID(), randomUUID())); } }  void repairLocalCommandsVersion(final Queue<ListCommand> localCommands,
            final ListCommand originalRemoteCommand); List<? extends ListCommand> repairRemoteCommandVersion(
            final List<? extends ListCommand> indexRepairedRemoteCommands,
            final List<ListCommand> versionRepairedLocalCommands);  }