refactor test-helper-test: extract function `forOwnRecursive`