@Test
public void testRefreshMultipleKeys()
{
ObjectStore os = ObjectStore.Factory.create();
ObjectStoreSession oss = os.beginSession();
X x1 = new X();
x1.blah = "fred1";
X x2 = new X();
x2.blah = "fred2";
X x3 = new X();
x3.blah = "fred3";
List<Key> keys = oss.store(x1, x2, x3).now();
x1.blah = null;
x2.blah = null;
x3.blah = null;
// without refresh
List<X> same = Lists.newArrayList(oss.load(keys).<X> now());
assertNull(same.get(0).blah);
assertNull(same.get(1).blah);
assertNull(same.get(2).blah);
List<X> list = Lists.newArrayList(oss.load(keys).refresh().<X> now());
assertEquals(x1, list.get(0));
assertEquals(x2, list.get(1));
assertEquals(x3, list.get(2));