test for extract_next_token