public void testCreateNoteConnection() {
mockElementFactory.expects(atLeastOnce()).method("create").
with(eq(ElementType.CLASS)).will(returnValue(clss));
ClassElement clss = factory.createClass();
NoteElement note = factory.createNote();
NoteConnection conn = (NoteConnection)
factory.createConnection(RelationType.NOTE_CONNECTOR, clss, note);
assertEquals(clss, conn.getNode1());
assertEquals(note, conn.getNode2());
assertEquals(1, clss.getConnections().size());
assertEquals(1, note.getConnections().size());
assertNull(conn.getParent());
}