Simplify the test code a bit