public boolean setRuleDescriptionContextKey(DefaultIssue issue, @Nullable String previousContextKey) {
    String currentContextKey = issue.getRuleDescriptionContextKey().orElse(null);
    issue.setRuleDescriptionContextKey(previousContextKey);
    if (!Objects.equals(currentContextKey, previousContextKey)) {
      issue.setRuleDescriptionContextKey(currentContextKey);
      issue.setChanged(true);
      return true;
    }
    return false;
  }
@Test
  void setRuleDescriptionContextKey_dontSetContextKeyIfPreviousValueIsTheSame() {
    issue.setRuleDescriptionContextKey(DEFAULT_RULE_DESCRIPTION_CONTEXT_KEY);
    boolean updated = underTest.setRuleDescriptionContextKey(issue, DEFAULT_RULE_DESCRIPTION_CONTEXT_KEY);

    assertThat(updated).isFalse();
    assertThat(issue.getRuleDescriptionContextKey()).contains(DEFAULT_RULE_DESCRIPTION_CONTEXT_KEY);
  }