@Test
	public void setMatrixElementThroughReference() {
		Context context = new Context();
		DataFactory factory = new DataFactory();
		IVPNumber a = factory.createIVPNumber();
		IVPNumber b = factory.createIVPNumber();
		Addition add = factory.createAddition();
		IVPNumber size = factory.createIVPNumber();
		IVPMatrix matrix = factory.createIVPMatrix();
		AttributionLine attLine = factory.createAttributionLine();
		IVPMatrixReference ref = factory.createIVPMatrixReference();
		IVPNumber line = factory.createIVPNumber();
		IVPNumber column = factory.createIVPNumber();

		a.setValueType(IVPValue.INTEGER_TYPE);
		b.setValueType(IVPValue.INTEGER_TYPE);
		size.setValueType(IVPValue.INTEGER_TYPE);
		line.setValueType(IVPValue.INTEGER_TYPE);
		column.setValueType(IVPValue.INTEGER_TYPE);

		context.addInt(size.getUniqueID(), 3);
		context.addInt(a.getUniqueID(), 1);
		context.addInt(b.getUniqueID(), 2);
		context.addInt(line.getUniqueID(), 0);
		context.addInt(column.getUniqueID(), 0);

		matrix.setSize(size.getUniqueID(), size.getUniqueID(), context);
		matrix.setType(IVPValue.INTEGER_TYPE);

		HashMap map = new HashMap();
		map.put(a.getUniqueID(), a);
		map.put(b.getUniqueID(), b);
		map.put(line.getUniqueID(), line);
		map.put(column.getUniqueID(), column);
		map.put(add.getUniqueID(), add);
		map.put(ref.getUniqueID(), ref);
		map.put(matrix.getUniqueID(), matrix);

		ref.setMatrixID(matrix.getUniqueID());
		ref.setLinID(line.getUniqueID());
		ref.setColID(column.getUniqueID());

		add.setExpressionA(a.getUniqueID());
		add.setExpressionB(b.getUniqueID());

		attLine.setVariable(ref.getUniqueID());
		attLine.setExpression(add.getUniqueID());

		attLine.evaluate(context, map, factory);

		IVPNumber result = (IVPNumber) ref.evaluate(context, map, factory);

		assertTrue(context.getInt(result.getUniqueID()) == 3);

	}