Add helper and tests on test validity by token