@Override
  public int hashCode() {
    return key.hashCode();
  }
@Test
  public void test_equals_and_hashcode() {
    ComponentImpl component = new ComponentImpl("Project1", Component.Type.PROJECT, null);
    ComponentImpl sameComponent = new ComponentImpl("Project1", Component.Type.PROJECT, null);
    ComponentImpl anotherComponent = new ComponentImpl("Project2", Component.Type.PROJECT, null);

    assertThat(component)
      .isEqualTo(component)
      .isEqualTo(sameComponent)
      .isNotEqualTo(anotherComponent)
      .isNotNull()
      .hasSameHashCodeAs(component)
      .hasSameHashCodeAs(sameComponent);
    assertThat(component.hashCode()).isNotEqualTo(anotherComponent.hashCode());
  }