Deque.java complete with test cases