Tests: Add some common utilities for unit tests