Move test functions into a Test class