Test for bad request added. Few more checks. Method that converts string to document replaced to class Parser and renamed.