Shared utilities for testing