@Test
public void testUpdateContext_forSmartIndex_3() {

	// Define a variable once
	String line = "define war id = t" + SMART_INDEX + " under /tomcat-vm";
	DefineVariableCommandInstruction instr = new DefineVariableCommandInstruction( this.context, line, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertEquals( "t1", this.context.variables.get( "war id" ));
	// Create this instance
	line = "Create tomcat as t1 under /tomcat-vm";
	CreateInstanceCommandInstruction ci = new CreateInstanceCommandInstruction( this.context, line, 1 );
	Assert.assertEquals( 0, ci.validate().size());
	ci.updateContext();
	// Define a new smart variable
	line = "define war id = t" + SMART_INDEX + " under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, line, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertEquals( "t2", this.context.variables.get( "war id" ));
}