### Question:
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; }### Answer:
@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()); }
@Test public void object_to_string() { assertThat(Persistent.object().toString()).isEqualTo("Object(Map)"); assertThat(Persistent.object("MyType").toString()).isEqualTo("Object(MyType)"); }
@Test public void generic_object() { assertThat(Persistent.object().isGeneric()).isTrue(); assertThat(Persistent.object("MyType").isGeneric()).isFalse(); }