// *****************************************
/**
* Simulates a dragging operation for resizing.
*/
public void testDragResizeSe() {
Dimension2D minimumSize = new DoubleDimension(10, 10);
// start dragging somewhere in the SE handle (322+, 425+)
selection.startDragging(324.0, 427.0);
assertTrue(selection.isDragging());
// make it a little bigger
mockNode.expects(atLeastOnce()).method("getMinimumSize").
will(returnValue(minimumSize));
selection.updatePosition(330.0, 450.0);
// and draw it
Mock mockDrawingContext = mock(DrawingContext.class);
// don't forget that sizes are truncated to the local system'
Constraint[] params = {eq(2.0), eq(5.0), eq(326.0), eq(443.0), NULL};
mockDrawingContext.expects(once()).method("drawRectangle").
with(params);
selection.draw((DrawingContext) mockDrawingContext.proxy());
// stop dragging
mockOperations.expects(once()).method("resizeElement").
with(eq(selection.getElement()), eq(new Point2D.Double(2.0, 5.0)),
eq(new DoubleDimension(326.0, 443.0)));
selection.stopDragging(330.0, 450.0);
assertFalse(selection.isDragging());
}