@Test
public void testUpdateContext() {

	String line = "replicate /tomcat-vm as vm-for-tomcat";
	ReplicateCommandInstruction instr = new ReplicateCommandInstruction( this.context, line, 1 );
	Assert.assertEquals( 0, instr.validate().size());
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/tomcat-vm" ));
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/tomcat-vm/tomcat-server" ));
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/tomcat-vm/tomcat-server/hello-world" ));
	int instancesCount = this.context.instancePathToComponentName.size();
	instr.updateContext();
	Assert.assertEquals( instancesCount + 3, this.context.instancePathToComponentName.size());
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/tomcat-vm" ));
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/tomcat-vm/tomcat-server" ));
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/tomcat-vm/tomcat-server/hello-world" ));
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/vm-for-tomcat" ));
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/vm-for-tomcat/tomcat-server" ));
	Assert.assertTrue( this.context.instancePathToComponentName.containsKey( "/vm-for-tomcat/tomcat-server/hello-world" ));
}