query unit tests