@VisibleForTesting
    static boolean isIdentityMapping(Map<Integer, Integer> map)
    {
        for (int i = 0; i < map.size(); i++) {
            if (!Objects.equals(map.get(i), i)) {
                return false;
            }
        }
        return true;
    }
@Test
    public void testIsOneToOneMapping()
    {
        assertTrue(isIdentityMapping(ImmutableMap.<Integer, Integer>builder()
                .put(0, 0)
                .put(1, 1)
                .put(2, 2)
                .put(3, 3)
                .build()));
        assertFalse(isIdentityMapping(ImmutableMap.<Integer, Integer>builder()
                .put(0, 0)
                .put(1, 1)
                .put(2, 2)
                .put(3, 3)
                .put(5, 5)
                .build()));
        assertFalse(isIdentityMapping(ImmutableMap.<Integer, Integer>builder()
                .put(0, 0)
                .put(1, 1)
                .put(2, 2)
                .put(4, 5)
                .build()));
    }