Adding test helper for asserting query count
Generalize decorator.
Doccing