Search in sources :

Example 1 with Retriever

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);
}
Also used : Retriever(org.janusgraph.util.datastructures.Retriever) StandardJanusGraphTx(org.janusgraph.graphdb.transaction.StandardJanusGraphTx) SliceQuery(org.janusgraph.diskstorage.keycolumnvalue.SliceQuery) Test(org.junit.jupiter.api.Test)

Aggregations

SliceQuery (org.janusgraph.diskstorage.keycolumnvalue.SliceQuery)1 StandardJanusGraphTx (org.janusgraph.graphdb.transaction.StandardJanusGraphTx)1 Retriever (org.janusgraph.util.datastructures.Retriever)1 Test (org.junit.jupiter.api.Test)1