Id implements Serializable, Comparable<Id<T>>, Identity<T> { public static <T> Id<T> create(long id) { return new Id<>(id); } protected  Id(long id); static Id<T> create(long id); @SuppressWarnings("unchecked") static Id<T> createCached(long id); @Override int hashCode(); @SuppressWarnings("rawtypes") @Override boolean equals(Object obj); @Override String toString(); @Override int compareTo(Id<T> o); final long id; }
@Test public void idDoesNotReturnTheSameInstance() { Assertions.assertNotSame(Id.create(RAW_ID), Id.create(RAW_ID)); }