@Test
    public void test_random_decrease() {
        int size = 100000;
        PairingHeap<Data> heap = new PairingHeap<Data>();
        Random random = new Random();
        List<PairNode<Data>> nodelist = new ArrayList<PairNode<Data>>();
        for (int i = 0; i < size; i++) {
            int rint = random.nextInt();
            Data d = new Data((float) rint);
            PairNode<Data> pn = heap.insert(d);
            nodelist.add(pn);
        }

        for (int i = 0; i < size; i++) {
            PairNode<Data> pn = nodelist.get(i);
            Data data = pn.getElement();
            data.value -= 100f;
            heap.decreaseKey(pn, data);
        }

        Data prev = heap.deleteMin();
        while (!heap.isEmpty()) {
            Data min = heap.deleteMin();
            assertTrue(min.value >= prev.value);
        }

    }