### Question:
Edge { public int length() { Vector vec = this.getDirection(); return (int) Math.sqrt(vec.getX() * vec.getX() + vec.getY() * vec.getY()); } Edge(Point tail, Point head); Point getHead(); Point getTail(); int length(); Vector getDirection(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testLength() { Edge vert = new Edge(new Point(0, 0), new Point(2, 0)); Assert.assertEquals(2, vert.length()); }