public boolean setResolution(DefaultIssue issue, @Nullable String resolution, IssueChangeContext context) {
    if (!Objects.equals(resolution, issue.resolution())) {
      issue.setFieldChange(context, RESOLUTION, issue.resolution(), resolution);
      issue.setResolution(resolution);
      issue.setUpdateDate(context.date());
      issue.setChanged(true);
      issue.setSendNotifications(true);
      return true;
    }
    return false;
  }
@Test
  void setResolution_shouldNotTriggerFieldChange() {
    boolean updated = underTest.setResolution(issue, Issue.STATUS_OPEN, context);
    assertThat(updated).isTrue();
    assertThat(issue.resolution()).isEqualTo(Issue.STATUS_OPEN);

    FieldDiffs.Diff diff = issue.currentChange().get(IssueFieldsSetter.RESOLUTION);
    assertThat(diff.oldValue()).isNull();
    assertThat(diff.newValue()).isEqualTo("OPEN");
    assertThat(issue.mustSendNotifications()).isTrue();
  }