improve trigger registration error message in test