Consolidate test support code.