Add new pending integration test, move common bits out into helpers