protected void assertUpdatedValues(DeltaAwareAccessor daa, int nodeThatReads) throws Exception { assertNumberOfEntries(nodeThatReads); Object obj1 = daa.getObject(cache(nodeThatReads), KEY1); assertNotNull(obj1); assertEquals( "** UPDATED** first component of object with key=" + KEY1, daa.getFirstComponent(obj1)); assertEquals("second component of object with key=" + KEY1, daa.getSecondComponent(obj1)); Object obj2 = daa.getObject(cache(nodeThatReads), KEY2); assertNotNull(obj2); assertEquals( "** UPDATED** first component of object with key=" + KEY2, daa.getFirstComponent(obj2)); assertEquals("second component of object with key=" + KEY2, daa.getSecondComponent(obj2)); assertNumberOfEntries(nodeThatReads); }
protected void assertInitialValues(DeltaAwareAccessor daa, int cacheIndex) throws Exception { assertNumberOfEntries(cacheIndex); final Object obj1 = daa.getObject(cache(cacheIndex), KEY1); assertNotNull(obj1); assertEquals("first component of object with key=" + KEY1, daa.getFirstComponent(obj1)); assertEquals("second component of object with key=" + KEY1, daa.getSecondComponent(obj1)); final Object obj2 = daa.getObject(cache(cacheIndex), KEY2); assertNotNull(obj2); assertEquals("first component of object with key=" + KEY2, daa.getFirstComponent(obj2)); assertEquals("second component of object with key=" + KEY2, daa.getSecondComponent(obj2)); assertNumberOfEntries(cacheIndex); }