move test helpers into src so other libs can use them