test cases for tail