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
    void tooManyElements() {
        create(3);
        push(1, 0.1f);
        push(2, 0.1f);
        push(0, 0.1f);
        // pushing element 1 again is not allowed (but this is not checked explicitly). however pushing more elements
        // than 3 is already an error
        assertThrows(IllegalStateException.class, () -> push(1, 0.1f));
        assertThrows(IllegalStateException.class, () -> push(2, 6.1f));
    }