Utils for test classes.

Signed-off-by: Jean-Yves Tinevez <jeanyves.tinevez@gmail.com>