@Test
    public void treeMapRetrievesIndexes()
    {
        Random r = new Random();
        for (int i = 0; i < 1000; i++)
        {
            MyInteger m = new MyInteger(r.nextInt(10000));
            if (!tree.contains(m))
                treeHeap.insert(m);
        }
        Object[] array = treeHeap.getArray();
        boolean test = true;
        for (int i = 0; i < treeHeap.size(); i++)
        {
            if (tree.get((MyInteger)array[i]) != i)
                test = false;
        }
        assertTrue(test);
    }