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 do_not_change_locations_if_primary_hash_changed() {
    DbCommons.TextRange range = DbCommons.TextRange.newBuilder().setStartLine(1).build();
    DbIssues.Locations locations = DbIssues.Locations.newBuilder()
      .setTextRange(range)
      .setChecksum("1")
      .build();
    issue.setLocations(locations);
    boolean updated = underTest.setLocations(issue, locations.toBuilder().setChecksum("2").build());
    assertThat(updated).isFalse();
  }