Helper utilities for tests