Remove duplicate test code