Merge pull request #21 from garthpatil/master

Added integration test for query and cancel.