@Test
public void editItem_switchEditedItem_itemsAreRefreshed() {

    grid.getDataCommunicator().getKeyMapper().key("foo");
    editor.editItem("bar");
    fakeClientResponse();
    editor.refreshedItems.clear();
    editor.editItem("foo");
    fakeClientResponse();
    Assert.assertEquals(2, editor.refreshedItems.size());
    Assert.assertEquals("bar", editor.refreshedItems.get(0));
    Assert.assertEquals("foo", editor.refreshedItems.get(1));
}