Mock mockListener = mock(UmlModelElementListener.class);
UmlClass clonedClass = (UmlClass) UmlClass.getPrototype().clone();
clonedClass.addModelElementListener((UmlModelElementListener)
mockListener.proxy());
List<UmlStereotype> stereotypeList = new ArrayList<UmlStereotype>();
UmlStereotype stereo1 = (UmlStereotype) UmlStereotype.getPrototype().clone();
UmlStereotype stereo2 = (UmlStereotype) UmlStereotype.getPrototype().clone();
UmlStereotype stereo3 = (UmlStereotype) UmlStereotype.getPrototype().clone();
stereotypeList.add(stereo1);
stereotypeList.add(stereo2);
stereotypeList.add(stereo3);
mockListener.expects(once()).method("elementChanged").with(eq(clonedClass));