Merge pull request #2 from Mirantis/master

Pull changes from upstream
added new test for query.
Merge pull request #55 from yyekovenko/master

Add new test for query