Factorize syntax messages

Only two for now, but this is going to change _very_ quickly.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Replace .msg(AsJson) with .msg(T)

Just have to make enum messages implement .toString(). Tests can then be
controlled by calling Enum.valueOf(Class<T>, String) for message correctness.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>