testgroup ShallowHistory for statechart ShallowHistory {
	test shallowHistoryTest {
		
		enter
		
		// Change active states to State9;
		raise event1
		cycle
		raise event3
		cycle
		raise event5
		cycle 
		raise event7
		cycle
		assert !active ( ShallowHistory.mainRegion.State1)
		assert active  (ShallowHistory.mainRegion.State2._region0.State4._region0.State7._region0.State9)
		
		// Leave State7. State9 should be saved as history.
		raise event6
		cycle
		assert !active (ShallowHistory.mainRegion.State2._region0.State4._region0.State7._region0.State9)
		assert active ( ShallowHistory.mainRegion.State2._region0.State4._region0.State6)
		
		// Reenter State7. State9 should be activated because of saved history.
		raise event5						
		cycle
		assert !active ( ShallowHistory.mainRegion.State2._region0.State4._region0.State7._region0.State8)
		assert active (ShallowHistory.mainRegion.State2._region0.State4._region0.State7._region0.State9)  
		
		// Leave State2. State4 and State9 should be saved as history.
		raise event2
		cycle
		assert !active (ShallowHistory.mainRegion.State2._region0.State4._region0.State7._region0.State9)
		assert active (ShallowHistory.mainRegion.State1)
		
		// Reenter State2. State6 should be activated (History of State2).
		raise event1
		cycle
		assert active (ShallowHistory.mainRegion.State2._region0.State4._region0.State6)
		assert!active (ShallowHistory.mainRegion.State1)
	
		// Reenter State7. State9 should be activated (History of State7).
		raise event5
		cycle
		assert !active(ShallowHistory.mainRegion.State2._region0.State4._region0.State6)
		assert active (ShallowHistory.mainRegion.State2._region0.State4._region0.State7._region0.State9)
	}
		
}
		
