removeLast must be like:
if (!isEmpty()) {
Node<T> last = trailer.getPrev();
T o = last.getElement();
Node<T> secondtolast = last.getPrev();
trailer.setPrev(secondtolast);
secondtolast.setNext(trailer);
size--;
return o;
} else {
throw new DequeEmptyException("Deque is empty!");
}