Fix structure of test code.