### Question:
HeapFixedStack implements Stack { public HeapFixedStack(int capacity, boolean fill) { this._capacity = capacity; this._next = new int[capacity]; this._prev = new int[capacity]; this._first = -1; this._last = -1; Arrays.fill(_next, 0, capacity, -1); Arrays.fill(_prev, 0, capacity, -1); if (fill) { for (int i = 0; i < capacity; i++) { int l = _last; _prev[i] = l; _last = i; if (_first == -1) { _first = i; } else { _next[l] = i; } } _count = capacity; } else { _count = 0; } } HeapFixedStack(int capacity, boolean fill); @Override synchronized final boolean enqueue(long index); @Override synchronized final long dequeueTail(); @Override synchronized final boolean dequeue(long index); @Override final void free(); @Override synchronized long size();  }### Answer:
@Test public void heapFixedStackTest() { test(new HeapFixedStack(CAPACITY, true)); }