@Override
  public boolean equals(Object o) {
    return o instanceof AddOn
        && TextUtils.equals(((AddOn) o).getId(), getId())
        && ((AddOn) o).getApiVersion() == getApiVersion();
  }
@Test
  public void testEquals() {
    TestableAddOn addOn1 = new TestableAddOn("id1", "name", 8);
    TestableAddOn addOn2 = new TestableAddOn("id2", "name", 8);
    TestableAddOn addOn11 = new TestableAddOn("id1", "name111", 8);
    TestableAddOn addOn1DifferentApiVersion = new TestableAddOn("id1", "name", 7);

    Assert.assertEquals(addOn1, addOn11);
    Assert.assertNotEquals(addOn1, addOn2);
    Assert.assertEquals(addOn1.hashCode(), addOn11.hashCode());
    Assert.assertNotEquals(addOn1.hashCode(), addOn2.hashCode());
    Assert.assertNotEquals(addOn1, addOn1DifferentApiVersion);

    Assert.assertNotEquals(new Object(), addOn1);
  }