### Question:
Reference { @Override public boolean equals(Object o) { if (o instanceof Reference<?>) { Reference<?> other = (Reference<?>) o; return this.type == other.type && this.id == other.id; } return false; } @SuppressWarnings("unchecked")  Reference(P propoid);  Reference(Class<? extends P> type, long id); @Override boolean equals(Object o); @Override int hashCode(); Uri toUri(); String toString(); @SuppressWarnings("unchecked") static Reference<P> from(String string); static Reference<P> from(Uri uri); static Reference<P> from(Intent intent); Intent to(Intent intent); static Reference<P> from(Bundle arguments); Bundle to(Bundle arguments); final Class<? extends P> type; final long id; }### Answer:
@Test public void testEquals() { assertTrue(new Reference<Foo>(Foo.class, 1).equals(new Reference<Foo>( Foo.class, 1))); assertFalse(new Reference<Foo>(Foo.class, 1).equals(new Reference<Foo>( Foo.class, 2))); }