refactored test cases of doubly linked list