EclipseTAC tac = new EclipseTAC(c.resolveBinding());
VariableDeclarationFragment f = EclipseTACSimpleTestDriver.getFirstField(cu);
Expression init = f.getInitializer();
Assert.assertNotNull(init);
TACInstruction decl = tac.instruction(f);
Assert.assertNotNull(decl);
Assert.assertTrue(decl instanceof StoreFieldInstruction);
StoreFieldInstruction store = (StoreFieldInstruction) decl;
Assert.assertTrue(store.getDestinationObject() instanceof ThisVariable);
Assert.assertEquals("f", store.getFieldName());
TACInstruction instr = tac.instruction(init);
Assert.assertNotNull(instr);
Assert.assertTrue(instr instanceof LoadLiteralInstruction);
LoadLiteralInstruction load = (LoadLiteralInstruction) instr;
Assert.assertEquals(load.getTarget(), store.getSourceOperand());
Assignment write = (Assignment) ((ExpressionStatement) EclipseTACSimpleTestDriver.getLastStatement(c)).getExpression();
TACInstruction again = tac.instruction(write);
Assert.assertNotNull(again);
Assert.assertTrue(again instanceof StoreFieldInstruction);
Assert.assertFalse(store.equals(again));
}