Add tests for before and after triggers