Edge { public int either() { return u; } 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 either() throws Exception { assertThat(new Edge(2, 3, Bond.IMPLICIT).either(), is(2)); assertThat(new Edge(3, 2, Bond.IMPLICIT).either(), is(3)); }