Added a junit test for parser class to test for invalid method exception
Added further test cases to parserTest class
refactored exception messages in parser class