public void testAddRemoveConnection() {
UmlAssociation assoc = (UmlAssociation)
UmlAssociation.getInstance().clone();
Line2D line = new Line2D.Double();
line.setLine(5.0, 5.0, 10.0, 5.0);
Connection conn = new BaseConnection(assoc, line);
diagram.addChild(conn);
assertEquals(diagram, conn.getParent());
assertEquals(conn, diagram.getChildAt(6.0, 5.0));
diagram.removeChild(conn);
assertNull(conn.getParent());
}