factored out shared tests helpers to itest-shared