@Test public void testEquivalence() { equivalenceTester() .addEquivalentGroup(createPerson("foo@example.com", "Mr Foo"), createPerson("foo@example.com", "Mr Foo")) .addEquivalentGroup(createPerson("bar@example.com", "Mr Bar"), createPerson("bar@example.com", "Mr Bar")) .addEquivalentGroup(createPerson("foo@example.com", "Mr Bar"), createPerson("foo@example.com", "Mr Bar")) .addEquivalentGroup(createPerson("bar@example.com", "Mr Foo"), createPerson("bar@example.com", "Mr Foo")) .check(); }
static Person createPerson(String email, String name) { return new AutoValue_Person(email, name); }
Person { static Person createPerson(String email, String name) { return new AutoValue_Person(email, name); } }
Person { static Person createPerson(String email, String name) { return new AutoValue_Person(email, name); }  }
Person { static Person createPerson(String email, String name) { return new AutoValue_Person(email, name); }  @JsonProperty abstract String getEmail(); @JsonProperty abstract String getName(); }
Person { static Person createPerson(String email, String name) { return new AutoValue_Person(email, name); }  @JsonProperty abstract String getEmail(); @JsonProperty abstract String getName();  }