Move test function implementations inline