test case running for the tail functionality