@Override
    public int size() {
        begin();
        int size = transactionalMap.size();
        commit();
        return size;
    }
@Test
    public void testSize() {
        map.put(23, "foo");
        map.put(42, "bar");

        assertEquals(2, adapter.size());
    }