TestUtils: create a static method to build a message

(should be backported to -core)

Tests are standardized, so can this method.
Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
TestUtils: add a comment about a possible factorization

Since test files themselves all have the same format, might as well standardize
the data providers as well... Same goes for -core.