Simplify test code