@Test public void object_identity() { Object o1 = Persistent.object(); Object o2 = Persistent.object(); assertThat(o1).isSameAs(o2); assertThat(o1).isEqualTo(o2); assertThat(o1).isNotEqualTo(Persistent.GENERIC_TYPE); Object o3 = Persistent.object(Persistent.GENERIC_TYPE); assertThat(o3).isNotSameAs(o2); assertThat(o3).isEqualTo(o2); assertThat(o3.hashCode()).isEqualTo(o2.hashCode()); Object o4 = Persistent.object("MyType"); assertThat(o4).isNotEqualTo(o3); assertThat(o4.hashCode()).isNotEqualTo(o3.hashCode()); }
public static Object object() { return GENERIC_OBJECT; }
Persistent { public static Object object() { return GENERIC_OBJECT; } }
Persistent { public static Object object() { return GENERIC_OBJECT; } private  Persistent(); }
Persistent { public static Object object() { return GENERIC_OBJECT; } private  Persistent(); static Object object(); static Object object(String alias); static Array array(); }
Persistent { public static Object object() { return GENERIC_OBJECT; } private  Persistent(); static Object object(); static Object object(String alias); static Array array(); static final String GENERIC_TYPE; static final Null NULL; }