Edge { @Override public int hashCode() { return xor; } Edge(final int u, final int v, final Bond bond);   Edge(Edge e); int either(); int other(final int x); Bond bond(); Bond bond(final int x); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString();  }
@Test public void undirectedHashCode() { assertThat(new Edge(0, 1, Bond.IMPLICIT).hashCode(), is(new Edge(1, 0, Bond.IMPLICIT).hashCode())); }
@Test public void directedHashCode() { assertThat(new Edge(0, 1, Bond.UP).hashCode(), is(new Edge(1, 0, Bond.DOWN).hashCode())); assertThat(new Edge(0, 1, Bond.UP).hashCode(), is(new Edge(1, 0, Bond.UP).hashCode())); }