Refactored tests and ASTQuery helper class