Add tests for provider parser, fix some error messages