Add test coverage for SQL Server query class