@Test
public void testUpdateContext_queryIndexes() {

	this.context.instancePathToComponentName.put( "/tomcat-vm/oops 1", this.app.getTomcatVm().getComponent().getName());
	this.context.instancePathToComponentName.put( "/tomcat-vm/oops 2", this.app.getTomcatVm().getComponent().getName());
	this.context.instancePathToComponentName.put( "/tomcat-vm/oops 3", this.app.getTomcatVm().getComponent().getName());
	String instr14 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MIN ) under /tomcat-vm";
	AbstractCommandInstruction instr = new DefineVariableCommandInstruction( this.context, instr14, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertFalse( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "oops 1", this.context.variables.get( "exi" ));
	String instr15 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MIN > 1 ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr15, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertFalse( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "oops 2", this.context.variables.get( "exi" ));
	String instr16 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MIN > 2 ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr16, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertFalse( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "oops 3", this.context.variables.get( "exi" ));
	String instr17 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MIN > 3 ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr17, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertTrue( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "fake", this.context.variables.get( "exi" ));
	String instr18 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MAX ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr18, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertFalse( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "oops 3", this.context.variables.get( "exi" ));
	String instr19 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MAX > 1 ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr19, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertFalse( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "oops 3", this.context.variables.get( "exi" ));
	String instr20 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MAX < 3 ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr20, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertFalse( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "oops 2", this.context.variables.get( "exi" ));
	String instr21 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MAX < 2 ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr21, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertFalse( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "oops 1", this.context.variables.get( "exi" ));
	String instr22 = "define exi = oops " + EXISTING_INDEX_PREFIX + " MAX > 3 ) under /tomcat-vm";
	instr = new DefineVariableCommandInstruction( this.context, instr22, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	instr.updateContext();
	Assert.assertTrue( instr.isDisabled());
	Assert.assertNotNull( this.context.variables.get( "exi" ));
	Assert.assertEquals( "fake", this.context.variables.get( "exi" ));
	Assert.assertEquals( 1, this.context.disabledVariables.size());
	Assert.assertEquals( "exi", this.context.disabledVariables.iterator().next());
}