Simplify test code.