added test for before & after query callback, ref #90