cleaned up testJsonParserAgent by adding a commonly used
helper macro.

Added macro:
- DEFINE_PARSER_AND_READ().

The macro defines JsonParserAgent, read test material file,
and check the result. User can simply add assertions soon after
this macro statement.