Fix broken tests: handle whitespaces as described in the specification