Housekeeping for tests