Consolidated testing code