public void testIterators() throws Exception {
  IgniteCache<Long,Long> cache=populate();
  int cnt=0;
  for (  Cache.Entry<Long,Long> e : cache.localEntries(CachePeekMode.OFFHEAP)) {
    assertEquals(e.getKey(),e.getValue());
    cnt++;
  }
  int cnt0=cnt;
  assertTrue(cnt > 0);
  for (  Cache.Entry<Long,Long> e : cache.localEntries(CachePeekMode.SWAP)) {
    assertEquals(e.getKey(),e.getValue());
    cnt++;
  }
  assertTrue(cnt > cnt0);
  assertEquals(ENTRY_CNT,cnt);
}

public void testIterators ( ) throws Exception { IgniteCache < Long , Long > cache = populate ( ) ; int cnt = 0 ; for ( Cache . Entry < Long , Long > e : cache . localEntries ( CachePeekMode . OFFHEAP ) ) { assertEquals ( e . getKey ( ) , e . getValue ( ) ) ; cnt ++ ; } int cnt0 = cnt ; assertTrue ( cnt > 0 ) ; for ( Cache . Entry < Long , Long > e : cache . localEntries ( CachePeekMode . SWAP ) ) { assertEquals ( e . getKey ( ) , e . getValue ( ) ) ; cnt ++ ; } assertTrue ( cnt > cnt0 ) ; assertEquals ( ENTRY_CNT , cnt ) ; }
tests offheap and swap iterators .
