Move test delegate into its own files