public void offer(int handle) {
        if (handle == NO_VALUE) {
            throw new IllegalArgumentException("The NO_VALUE (" + NO_VALUE + ") cannot be added to the queue.");
        }
        size++;
        if (size == array.length) {
            // Grow queue capacity.
            array = Arrays.copyOf(array, 1 + (array.length - 1) * 2);
        }
        array[size] = handle;
        lift(size);
    }
@Test
    public void mustThrowWhenAddingNoValue() {
        final IntPriorityQueue pq = new IntPriorityQueue();
        assertThrows(IllegalArgumentException.class, new Executable() {
            @Override
            public void execute() {
                pq.offer(IntPriorityQueue.NO_VALUE);
            }
        });
    }