assertEquals("Missing invocation from " + methodDoSomething.getUniqueName() + " to " + methodSurfaceWeight.getUniqueName(), 1, nrInvocationsTo);
}
@Test
public void testInvokeSuperMethodFromAnonymousClass() {
FamixClass anonymClass = (FamixClass) aModel.getElement(aFactory.createClass("testPackage.ae.EnumPlanet$1", null));
FamixMethod newMethodMass = (FamixMethod) aModel.getElement(aFactory.createMethod("testPackage.ae.EnumPlanet$1.mass()", null));
FamixMethod superMethodMass = (FamixMethod) aModel.getElement(aFactory.createMethod("testPackage.ae.EnumPlanet.mass()", null));
assertNotNull("FamixModel must contain anonymous class testPackage.ae.EnumPlanet$1", anonymClass);
assertNotNull("FamixModel must contain method testPackage.ae.EnumPlanet$1.mass()", newMethodMass);
assertNotNull("FamixModel must contain method testPackage.ae.EnumPlanet.mass()", superMethodMass);
assertTrue("FamixClass must contain method", anonymClass.getMethods().contains(newMethodMass));
assertEquals("No or wrong parent class of method ", anonymClass, newMethodMass.getParent());
Set<FamixAssociation> lRelations = aModel.getAssociations(newMethodMass);
int nrInvocationsTo = TestHelper.containsRelationTo(superMethodMass, lRelations);
assertEquals("Missing invocation from " + newMethodMass.getUniqueName() + " to " + superMethodMass.getUniqueName(), 1, nrInvocationsTo);