Add a test assert to prevent crashes on failure