 should close cursor and cache") {     val monitor = QueryStateHelper.trackClosedMonitor     val resourceManager = new ResourceManager(monitor)     val state = QueryStateHelper.emptyWithResourceManager(resourceManager)     val nodeCursor = new StubNodeCursor(false)       .withNode(00).withNode(00).withDegree(00)     val relCursor = new StubRelationshipCursor(new TestRelationshipChain(00).outgoing(0, 00, 0))     Mockito.when(state.query.traversalCursor()).thenReturn(relCursor)     Mockito.when(state.query.nodeCursor()).thenReturn(nodeCursor)      val input = new FakePipe(Seq(Map("a"->newMockedNode(00), "b"->newMockedNode(00))))     val pipe = ExpandIntoPipe(input, "a", "r", "b", SemanticDirection.OUTGOING, new EagerTypes(Array(0)))()     