remove duplicate test code