test: share common code