public boolean setLocations(DefaultIssue issue, @Nullable Object locations) {
    if (!locationsEqualsIgnoreHashes(locations, issue.getLocations())) {
      issue.setLocations(locations);
      issue.setChanged(true);
      issue.setLocationsChanged(true);
      return true;
    }
    return false;
  }
@Test
  void change_locations_if_primary_text_rage_changed() {
    DbCommons.TextRange range = DbCommons.TextRange.newBuilder().setStartLine(1).build();
    DbIssues.Locations locations = DbIssues.Locations.newBuilder()
      .setTextRange(range)
      .build();
    DbIssues.Locations locations2 = locations.toBuilder().setTextRange(range.toBuilder().setEndLine(2).build()).build();
    issue.setLocations(locations);
    boolean updated = underTest.setLocations(issue, locations2);
    assertThat(updated).isTrue();
    assertThat((Object) issue.getLocations()).isEqualTo(locations2);
    assertThat(issue.locationsChanged()).isTrue();
    assertThat(issue.currentChange()).isNull();
    assertThat(issue.mustSendNotifications()).isFalse();
  }