Unit test small refactoring

I don't remember any more what was this, and why it was not
committed long ago.