Refactor Queue test and add guard on item not there in linked list