Added tests for transitin manager, fixed several issues in trans mgr highlighted by tests