Slightly better API for testing