Reorganize test dependencies.