Minor code changes in tests.