@Test
    public void poppingReturnsSmallestElements()
    {
        for (int i = 0; i < 1000; i++)
            heap.insert((int)(Math.random() * 10000));
        int old = -1;
        boolean test = true;
        while (!heap.isEmpty())
        {
            int i = heap.pop();
            if (i < old)   test = false;
            old = i;
        }
        assertTrue(test);
    }