Add StateManagerTest