@Test
public void testCompact() {

	final char first = 'a', last = 'z';
	final int n = last - first;
	//ADD, CLEAR AND COMPACT
	for (char c = first; c <= last; c++) {
		deque.addLast(c);
	}
	deque.clear(); // Removes all the elements
	assertTrue(deque.isEmpty());
	deque.compact(); // Compacts the deque
	assertTrue(deque.isEmpty());
	//ADD, REMOVE AND COMPACT
	for (char c = first; c <= last; c++) {
		deque.addLast(c);
		System.out.println(c + " => " + deque.size());
	}
	deque.removeFirst(); // Removes 1 element
	assertFalse(deque.isEmpty(), "The dequeue should NOT be empty!");
	assertEquals(n, deque.size());
	deque.compact(); // Compacts the deque
	assertFalse(deque.isEmpty(), "The dequeue should NOT be empty!");
	assertEquals(n, deque.size());
	deque.addLast('€');
	assertFalse(deque.isEmpty(), "The dequeue should NOT be empty!");
	assertEquals(n + 1, deque.size());
}