@Test public void testEquals() { for (Class<? extends StandardIntent> intentClass : BUILT_INS) { StandardIntent intent1 = Utils.instantiate(intentClass); StandardIntent intent2 = Utils.instantiate(intentClass); assertEqualsIntent(intent1, intent1); assertEqualsIntent(intent1, intent2); assertNotEquals(null, intent1); assertNotEquals(intent1, null); assertNotEquals(intent1, "differentClass"); assertNotEquals("differentClass", intent1); } }
@Override public boolean equals(Object obj) { return obj != null && obj.getClass() == getClass(); }
StandardIntent { @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == getClass(); } }
StandardIntent { @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == getClass(); } StandardIntent(); }
StandardIntent { @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == getClass(); } StandardIntent(); @Override boolean equals(Object obj); @Override int hashCode(); }
StandardIntent { @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == getClass(); } StandardIntent(); @Override boolean equals(Object obj); @Override int hashCode();  }