### Question:
FixedSizeQueue extends LinkedList<E> { private FixedSizeQueue(int maxSize) { Validate.isTrue(maxSize > 0, "maxSize must be greater zero."); this.maxSize = maxSize; } private  FixedSizeQueue(int maxSize); static FixedSizeQueue<E> create(int maxSize); @Override boolean add(E e);  }### Answer:
@Test public void testFixedSizeQueue() { List<Integer> queue = FixedSizeQueue.create(5); queue.add(1); queue.add(2); queue.add(3); queue.add(4); queue.add(5); assertEquals(5, queue.size()); assertEquals(Arrays.asList(1, 2, 3, 4, 5), queue); queue.add(6); assertEquals(5, queue.size()); assertEquals(Arrays.asList(2, 3, 4, 5, 6), queue); }