}
@Test
public void testCastTo() {
FamixMethod method = (FamixMethod) aModel.getElement(aFactory.createMethod("testPackage.ae.Test.computeAllSums()", null));
FamixClass classSum = (FamixClass) aModel.getElement(aFactory.createClass("testPackage.Sum", null));
// check method rel. container
Set<FamixAssociation> lRelations = aModel.getAssociations(method);
assertTrue("FamixMethod " + method.getUniqueName() + " must contain relationships", lRelations.size() > 0);
boolean containsRelTo = TestHelper.containsRelationTo(new FamixCastTo(method, classSum), lRelations);
assertTrue("Missing castTo relationship from " + method.getUniqueName() + " to " + classSum.getUniqueName(), containsRelTo);
// check castTo class rel. container
lRelations = aModel.getAssociations(classSum);
assertTrue("FamixClass " + classSum.getUniqueName() + " must contain relationships", lRelations.size() > 0);
containsRelTo = TestHelper.containsRelationTo(new FamixCastTo(method, classSum), lRelations);
assertTrue("Missing castTo relationship from " + method.getUniqueName() + " to " + classSum.getUniqueName(), containsRelTo);
}