public boolean setPastLine(DefaultIssue issue, @Nullable Integer previousLine) {
    Integer currentLine = issue.line();
    issue.setLine(previousLine);
    if (!Objects.equals(currentLine, previousLine)) {
      issue.setLine(currentLine);
      issue.setChanged(true);
      return true;
    }
    return false;
  }
@Test
  void set_past_line() {
    issue.setLine(42);

    boolean updated = underTest.setPastLine(issue, 123);

    assertThat(updated).isTrue();
    assertThat(issue.isChanged()).isTrue();
    assertThat(issue.line()).isEqualTo(42);
    assertThat(issue.mustSendNotifications()).isFalse();
    // do not save change
    assertThat(issue.currentChange()).isNull();
  }