added tests for the consume and parse functions