@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    QProfile qProfile = (QProfile) o;
    return key.equals(qProfile.key);
  }
@Test
  public void testEquals() {
    QProfile q1 = new QProfile("k1", "name1", null, null);
    QProfile q2 = new QProfile("k1", "name2", null, null);
    QProfile q3 = new QProfile("k3", "name3", null, null);

    assertThat(q1)
      .isEqualTo(q2)
      .isNotEqualTo(q3)
      .isNotNull()
      .isNotEqualTo("str");
    assertThat(q2).isNotEqualTo(q3);

    assertThat(q1).hasSameHashCodeAs(q2);
    assertThat(q1.hashCode()).isNotEqualTo(q3.hashCode());
    assertThat(q2.hashCode()).isNotEqualTo(q3.hashCode());
  }