Merge "Fix Transition test logic and consolidate some boilerplate"