// create the mock table for the iterator
AbstractHashTable table = mock( AbstractHashTable.class );
when( table.getTable() ).thenReturn( entries );
// create the iterator
FieldIndexHashTableFullIterator iterator = new FieldIndexHashTableFullIterator( table );
// test it
assertThat( iterator.next(),
sameInstance( (Object) tuples[0] ) );
assertThat( iterator.next(),
sameInstance( (Object) tuples[1] ) );
assertThat( iterator.next(),
sameInstance( (Object) tuples[2] ) );
assertThat( iterator.next(),
is( (Object) null ) );
}