Refactoring of some tests.