HasOne extends Relationship<T> implements Serializable { @Override public int hashCode() { return linkedResource != null ? linkedResource.hashCode() : 0; } HasOne();  HasOne(String type, String id);  HasOne(ResourceIdentifier linkedResource); @Override T get(Document document); T get(Document document, T defaultValue); ResourceIdentifier get(); void set(ResourceIdentifier identifier); void set(String type, String id); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void hashcode_equality() throws Exception { assertEquals(createHasOne().hashCode(), createHasOne().hashCode()); }