Move test into a script