Add unit test for spawning.