RelationshipContext rels = new RelationshipContext(false);
List<StubVariable> vars = new LinkedList<StubVariable>();
vars.add(new StubVariable("p0", "Bar"));
StubNewObjectInstruction instr = new StubNewObjectInstruction(vars,
new StubMethodBinding(new NamedTypeBinding("Foo"), new NamedTypeBinding[]{new NamedTypeBinding("Bar")}), new StubVariable("tVar", "Foo"));
TestAliasContext aliases = new TestAliasContext();
aliases.addAlias(instr.getTarget(), labels[3]);
aliases.addAlias(instr.getArgOperands().get(0), labels[5]);
AliasDelta expected = new AliasDelta();
expected.addChange(instr.getTarget(), labels[3]);
expected.addChange(instr.getArgOperands().get(0), labels[5]);
Operation op = new ConstructorOp("Foo", new SpecVar[] {utils.getVar(0)}, new String[] {"Bar"});
List<Effect> effects = new LinkedList<Effect>();
effects.add(RelEffect.createRemoveEffect(utils.getRelation(1), new SpecVar[] {utils.getVar(0), utils.getVar(0)}));
effects.add(RelEffect.createAddEffect(utils.getRelation(0), new SpecVar[] {Constraint.RESULT, utils.getVar(0)}));