public void update(int key, int oldValue, int value) {
        remove(key, oldValue);
        insert(key, value);
    }
@Test
    public void testUpdate() {
        GHSortedCollection instance = new GHSortedCollection();
        assertTrue(instance.isEmpty());
        instance.insert(0, 10);
        instance.insert(1, 11);
        assertEquals(10, instance.peekValue());
        assertEquals(2, instance.getSize());
        instance.update(0, 10, 12);
        assertEquals(11, instance.peekValue());
        assertEquals(2, instance.getSize());
    }