Add some utilities for tests