assertEquals(originalHeight, diagram.getSize().getHeight());
// simulate a node that is moved outside the bounds, resize the diagram
Mock mockNode2 = mock(Node.class);
double node2X2 = 55.0, node2Y2 = 67.0;
mockNode2.expects(once()).method("setParent").with(eq(diagram));
mockNode2.expects(atLeastOnce()).method("getAbsoluteX2").
will(returnValue(node2X2));
mockNode2.expects(atLeastOnce()).method("getAbsoluteY2").
will(returnValue(node2Y2));
diagram.addChild((DiagramElement) mockNode2.proxy());