use of org.neo4j.collection.primitive.PrimitiveLongLongVisitor in project neo4j by neo4j.
the class PrimitiveLongMapTest method longLongEntryVisitorShouldSeeAllEntriesIfItDoesNotBreakOut.
@SuppressWarnings("unchecked")
@Test
public void longLongEntryVisitorShouldSeeAllEntriesIfItDoesNotBreakOut() {
// GIVEN
PrimitiveLongLongVisitor<RuntimeException> visitor;
try (PrimitiveLongLongMap map = Primitive.offHeapLongLongMap()) {
map.put(1, 100);
map.put(2, 200);
map.put(3, 300);
visitor = mock(PrimitiveLongLongVisitor.class);
// WHEN
map.visitEntries(visitor);
}
// THEN
verify(visitor).visited(1, 100);
verify(visitor).visited(2, 200);
verify(visitor).visited(3, 300);
verifyNoMoreInteractions(visitor);
}
Aggregations