public void push(int id, float value) {
        checkIdInRange(id);
        if (size == max)
            throw new IllegalStateException("Cannot push anymore, the heap is already full. size: " + size);
        if (contains(id))
            throw new IllegalStateException("Element with id: " + id + " was pushed already, you need to use the update method if you want to change its value");
        size++;
        tree[size] = id;
        positions[id] = size;
        vals[size] = value;
        percolateUp(size);
    }
@Test
    public void outOfRange() {
        assertThrows(IllegalArgumentException.class, () -> new MinHeapWithUpdate(4).push(4, 1.2f));
        assertThrows(IllegalArgumentException.class, () -> new MinHeapWithUpdate(4).push(-1, 1.2f));
    }