@Override
  public int hashCode() {
    return key.hashCode();
  }
@Test
  public void test_equals_and_hashcode() {
    NewAdHocRule adHocRule1 = new NewAdHocRule(ScannerReport.ExternalIssue.newBuilder().setEngineId("eslint").setRuleId("no-cond-assign").build());
    NewAdHocRule adHocRule2 = new NewAdHocRule(ScannerReport.ExternalIssue.newBuilder().setEngineId("eslint").setRuleId("no-cond-assign").build());
    NewAdHocRule anotherAdHocRule = new NewAdHocRule(ScannerReport.ExternalIssue.newBuilder().setEngineId("eslint").setRuleId("another").build());

    assertThat(adHocRule1)
      .isEqualTo(adHocRule1)
      .isEqualTo(adHocRule2)
      .isNotNull()
      .isNotEqualTo(anotherAdHocRule)
      .hasSameHashCodeAs(adHocRule1)
      .hasSameHashCodeAs(adHocRule2);
    assertThat(adHocRule1.hashCode()).isNotEqualTo(anotherAdHocRule.hashCode());
  }