Improve test code.