@Override
    public Iterator<Map.Entry<K, V>> iterator() {
        return Collections.unmodifiableSet(state.entrySet()).iterator();
    }
@Test
    void testIterator() throws Exception {
        assertThat(mapState.contains(1L)).isTrue();
        long value = mapState.get(1L);
        assertThat(value).isEqualTo(5L);

        assertThat(mapState.contains(2L)).isTrue();
        value = mapState.get(2L);
        assertThat(value).isEqualTo(5L);
        assertThatThrownBy(
                        () -> {
                            Iterator<Map.Entry<Long, Long>> iterator = mapState.iterator();
                            while (iterator.hasNext()) {
                                iterator.remove();
                            }
                        })
                .isInstanceOf(UnsupportedOperationException.class);
    }