@Test
public void testRemoveDuringIteration1() {

    SafeIterableMap<Integer, Integer> map = from(1, 2, 3, 4).to(10, 20, 30, 40);
    int index = 0;
    int[] expected = new int[]{1, 4};
    for (Entry<Integer, Integer> i : map) {
        assertThat(i.getKey(), is(expected[index++]));
        if (index == 1) {
            assertThat(map.remove(2), is(20));
            assertThat(map.remove(3), is(30));
        }
    }
}