public boolean setImpacts(DefaultIssue issue, Map<SoftwareQuality, Severity> previousImpacts, IssueChangeContext context) {
    Map<SoftwareQuality, Severity> currentImpacts = new EnumMap<>(issue.impacts());
    if (!previousImpacts.equals(currentImpacts)) {
      issue.replaceImpacts(currentImpacts);
      issue.setUpdateDate(context.date());
      issue.setChanged(true);
      return true;
    }
    return false;
  }
@Test
  void setImpacts_whenImpactAdded_shouldBeUpdated() {
    Map<SoftwareQuality, Severity> currentImpacts = Map.of(SoftwareQuality.RELIABILITY, Severity.LOW);
    Map<SoftwareQuality, Severity> newImpacts = Map.of(SoftwareQuality.MAINTAINABILITY, Severity.HIGH);

    issue.replaceImpacts(newImpacts);
    boolean updated = underTest.setImpacts(issue, currentImpacts, context);
    assertThat(updated).isTrue();
    assertThat(issue.impacts()).isEqualTo(newImpacts);
  }