/**
* Tests generation between two nodes that can be aligned in SE-NW (\)
* direction.
*/
public void testCalculateLineSegmentsWithNodesSeNw() {
Node node1 = new MyNode();
node1.setOrigin(10, 10);
node1.setSize(120, 80);
Node node2 = new MyNode();
node2.setOrigin(150, 120);
node2.setSize(80, 30);
// goes from top left to bottom right
List<Point2D> points = builder.calculateLineSegments(node1, node2);
assertEquals(3, points.size());
assertEquals(node1.getAbsoluteX2(), points.get(0).getX());
assertEquals(node1.getAbsCenterY(), points.get(0).getY());
assertEquals(node2.getAbsCenterX(), points.get(2).getX());
assertEquals(node2.getAbsoluteY1(), points.get(2).getY());
// reverse directions
points = builder.calculateLineSegments(node2, node1);
assertEquals(3, points.size());
assertEquals(node2.getAbsoluteX1(), points.get(0).getX());
assertEquals(node2.getAbsCenterY(), points.get(0).getY());
assertEquals(node1.getAbsCenterX(), points.get(2).getX());
assertEquals(node1.getAbsoluteY2(), points.get(2).getY());
}