LinkedList test impl in java