use of org.janusgraph.util.datastructures.Retriever in project janusgraph by JanusGraph.
the class CacheVertexTest method testLoadRelationsWithNullSuperSetValue.
@Test
public void testLoadRelationsWithNullSuperSetValue() {
final SliceQuery mockSliceQuery = createMock(SliceQuery.class);
final Retriever mockRetriever = createMock(Retriever.class);
expect(mockSliceQuery.subsumes(isA(SliceQuery.class))).andReturn(true);
expect(mockRetriever.get(isA(SliceQuery.class))).andReturn(null);
replayAll();
final CacheVertex cacheVertex = createMockBuilder(CacheVertex.class).withConstructor(createMock(StandardJanusGraphTx.class), 0L, (byte) 0).addMockedMethod("isNew").createMock();
expect(cacheVertex.isNew()).andReturn(false);
replay(cacheVertex);
cacheVertex.addToQueryCache(mockSliceQuery, null);
cacheVertex.loadRelations(createMock(SliceQuery.class), mockRetriever);
verify(mockRetriever);
}
Aggregations