public void set(int index, E value) {
        assert value != null;
        Storage32 newStorage = storage.set(index, value);
        if (newStorage != storage) {
            storage = newStorage;
        }
    }
@Test
    public void testSetDenseToSparse32WithCapacityEqualToSize() {
        // add some dense entries
        for (int i = 0; i < capacityDeltaInt(0) + 1; ++i) {
            set(i);
            verify();
        }
        // at this point capacity is equal to size

        // go far beyond the last index to trigger dense to sparse conversion
        set(ARRAY_STORAGE_32_MAX_SPARSE_SIZE * 1000);
        verify();

        // make sure we are still good
        for (int i = 0; i < ARRAY_STORAGE_32_MAX_SPARSE_SIZE * 5; ++i) {
            set(i);
            verify();
        }
    }