Change definition of 'getState'

as a variable
Add test for 'parse'