@Override
  public boolean equals(Object that)
  {
    if (that instanceof IdResponse)
    {
      IdResponse<?> thatIdResponse = (IdResponse<?>) that;
      return (this._key == null)? thatIdResponse._key == null : this._key.equals(thatIdResponse._key);
    }
    else
    {
      return false;
    }
  }
@Test
  public void testEquals()
  {
    IdResponse<Long> longResponse1 = new IdResponse<>(1L);
    IdResponse<Long> longResponse2 = new IdResponse<>(1L);
    IdResponse<Long> nullLongResponse = new IdResponse<>(null);
    IdResponse<String> stringResponse = new IdResponse<>("hello");
    IdResponse<String> nullStringResponse = new IdResponse<>(null);

    // equals and non-null.
    Assert.assertTrue(longResponse1.equals(longResponse2));

    // equals and null
    Assert.assertTrue(nullLongResponse.equals(nullStringResponse));
    Assert.assertTrue(nullStringResponse.equals(nullLongResponse));

    // unequal and non-null
    Assert.assertFalse(longResponse1.equals(stringResponse));

    // unequal and one null
    Assert.assertFalse(longResponse1.equals(nullLongResponse));
    Assert.assertFalse(nullLongResponse.equals(longResponse1));
  }