// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragBy(final Node node, final double dx, final double dy) {
//     dragTo(node, node.getLayoutX() + dx, node.getLayoutY() + dy);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragTo(final Node node, final double endX, final double endY) {
//     dragTo(node, 0, 0, endX, endY);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void forceLayoutUpdate(final Parent parent) {
//     parent.autosize();
//     parent.snapshot(null, null);
//     parent.layout();
// }
// 
// Path: api/src/main/java/de/tesis/dynaware/grapheditor/EditorElement.java
// public enum EditorElement
// {
//     CONNECTOR,
//     NODE,
//     JOINT;
// }


import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragBy;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragTo;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.forceLayoutUpdate;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import de.tesis.dynaware.grapheditor.EditorElement;
import javafx.scene.layout.Pane;


        properties.setEastBoundValue(BOUNDARY_INDENT);
        properties.setWestBoundValue(BOUNDARY_INDENT);
        properties.setNorthBoundValue(BOUNDARY_INDENT);
        properties.setSouthBoundValue(BOUNDARY_INDENT);
        properties.setSnapToGrid(false);

        box.resize(BOX_WIDTH, BOX_HEIGHT);
        box.setLayoutX(BOX_INITIAL_X);
        box.setLayoutY(BOX_INITIAL_Y);
        box.setAlignmentTargetsX(null);
        box.setAlignmentTargetsY(null);
        box.setEditorProperties(properties);

        container.setPrefSize(400, 300);
        container.autosize();
        container.getChildren().add(box);
    }

    @Test
    public void testDrag_Simple() {

        // Try some simple drag operations.
        dragBy(box, 100, 100);
        assertAt(BOX_INITIAL_X + 100, BOX_INITIAL_Y + 100);

        dragBy(box, -50, 75);
        assertAt(BOX_INITIAL_X + 50, BOX_INITIAL_Y + 175);

        // Move the cursor to the top left of the scene - should stop at the boundary values.

// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragBy(final Node node, final double dx, final double dy) {
//     dragTo(node, node.getLayoutX() + dx, node.getLayoutY() + dy);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void dragTo(final Node node, final double endX, final double endY) {
//     dragTo(node, 0, 0, endX, endY);
// }
// 
// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/FXTestUtils.java
// public static void forceLayoutUpdate(final Parent parent) {
//     parent.autosize();
//     parent.snapshot(null, null);
//     parent.layout();
// }
// 
// Path: api/src/main/java/de/tesis/dynaware/grapheditor/EditorElement.java
// public enum EditorElement
// {
//     CONNECTOR,
//     NODE,
//     JOINT;
// }


// Path: api/src/test/java/de/tesis/dynaware/grapheditor/utils/DraggableBoxTest.java
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragBy;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.dragTo;
import static de.tesis.dynaware.grapheditor.utils.FXTestUtils.forceLayoutUpdate;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import de.tesis.dynaware.grapheditor.EditorElement;
import javafx.scene.layout.Pane;


        properties.setEastBoundValue(BOUNDARY_INDENT);
        properties.setWestBoundValue(BOUNDARY_INDENT);
        properties.setNorthBoundValue(BOUNDARY_INDENT);
        properties.setSouthBoundValue(BOUNDARY_INDENT);
        properties.setSnapToGrid(false);

        box.resize(BOX_WIDTH, BOX_HEIGHT);
        box.setLayoutX(BOX_INITIAL_X);
        box.setLayoutY(BOX_INITIAL_Y);
        box.setAlignmentTargetsX(null);
        box.setAlignmentTargetsY(null);
        box.setEditorProperties(properties);

        container.setPrefSize(400, 300);
        container.autosize();
        container.getChildren().add(box);
    }

    @Test
    public void testDrag_Simple() {

        // Try some simple drag operations.
        dragBy(box, 100, 100);
        assertAt(BOX_INITIAL_X + 100, BOX_INITIAL_Y + 100);

        dragBy(box, -50, 75);
        assertAt(BOX_INITIAL_X + 50, BOX_INITIAL_Y + 175);

        // Move the cursor to the top left of the scene - should stop at the boundary values.

        dragTo(box, 10, 10);
