### Question:
GraphEdge implements Comparable<GraphEdge> { @Override public int compareTo(GraphEdge other) { int i = ((Comparable<Object>) value).compareTo(other.value); if (i == 0) { int j = ((Comparable<Object>) x).compareTo(other.x); if (j == 0) { return ((Comparable<Object>) y).compareTo(other.y); } else { return j; } } else { return i; } } GraphEdge(Object x, Object y, Object value); Object getX(); Object getY(); Object getValue(); boolean equals(GraphEdge other); @Override int hashCode(); @Override String toString(); @Override boolean equals(Object other); @Override int compareTo(GraphEdge other);  }### Answer:
@Test public void compareToInputNotNullOutputNegative() { final GraphEdge objectUnderTest = new GraphEdge(null, -1, 232_501_675); final GraphEdge other = new GraphEdge(null, -1, 435_655_486); final int retval = objectUnderTest.compareTo(other); Assert.assertEquals(-1, retval); }
@Test public void compareToInputNotNullOutputNegative2() { final GraphEdge objectUnderTest = new GraphEdge(null, 2_147_483_295, 536_871_680); final GraphEdge other = new GraphEdge(34_627_582, 2_147_483_551, 541_065_984); final int retval = objectUnderTest.compareTo(other); Assert.assertEquals(-1, retval); }
@Test public void compareToInputNotNullOutputPositive() { final GraphEdge objectUnderTest = new GraphEdge(null, 2_147_483_295, 541_065_984); final GraphEdge other = new GraphEdge(34_627_582, 2_147_483_551, 536_871_680); final int retval = objectUnderTest.compareTo(other); Assert.assertEquals(1, retval); }
@Test public void compareToInputNotNullOutputPositive2() { final GraphEdge objectUnderTest = new GraphEdge(null, -1, 2_147_483_323); final GraphEdge other = new GraphEdge(null, -1, 1_879_047_867); final int retval = objectUnderTest.compareTo(other); Assert.assertEquals(1, retval); }
@Test public void compareToInputNotNullOutputPositive3() { final GraphEdge objectUnderTest = new GraphEdge(1_349_517_313, null, 558_365_760); final GraphEdge other = new GraphEdge(1_349_517_312, 0, 558_365_760); final int retval = objectUnderTest.compareTo(other); Assert.assertEquals(1, retval); }
@Test public void compareToInputNotNullOutputZero() { final GraphEdge objectUnderTest = new GraphEdge(1_416_985_954, 0, 4_255_775); final GraphEdge other = new GraphEdge(1_416_985_954, 0, 4_255_775); final int retval = objectUnderTest.compareTo(other); Assert.assertEquals(0, retval); }