/**
* Tests the run() method.
*/
public void testRun() {
UmlAssociation assoc = (UmlAssociation)
UmlAssociation.getInstance().clone();
mockFactory.expects(once()).method("create").
with(eq(ElementType.DEPENDENCY)).will(returnValue(assoc));
mockSourceNode.expects(once()).method("getModelElement").
will(returnValue(source));
mockTargetNode.expects(once()).method("getModelElement").
will(returnValue(target));
mockDiagram.expects(once()).method("addConnection");
mockNotification.expects(once()).method("notifyElementAdded");
command.run();
Connection conn = command.getConnection();
assertNotNull(conn);
assertEquals(source, assoc.getSource());
assertEquals(target, assoc.getTarget());
}