Alter test code for consistency and readability