cleaned up testJsonParserAgent by defining the commonly used
helper macro: DEFINE_PARSER_AND_READ.

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