doco
Important we don't mutate test since this messes up later pattern matching.