//ensure coordinates
GraphVisitor visitor = new GraphVisitor() {
public int visit(Graphable component) {
Edge e = (Edge)component;
XYNode a = (XYNode)e.getNodeA();
XYNode b = (XYNode)e.getNodeB();
//coordinats should be a distance of sqrt(2)
if (b.getCoordinate().equals(base))
assertTrue(a.getCoordinate().equals(new Coordinate(n,n)));
else
assertTrue(
b.getCoordinate().equals(
new Coordinate(a.getCoordinate().x+1, a.getCoordinate().y+1)
)
);
// if (b.getX() == base.x && b.getY() == base.y)