Used inheritance to reuse test cases

Due to the similarities between the test cases for token parser and
query parser I devised a way to reuse them. I defined a parseString
method which for the query parser test uses a query parser, and for the
simple token parser test uses a tokenizer and a token parser. This way
when new test cases the tokenizer must handle are created, it also
checks that the query parser can handle it too.