@@ -410,6 +410,40 @@ public void graphGetEdgeCursorByExampleStartVertexRestriction() throws ArangoExc
410410 assertThat (cursor .getCount (), is (2 ));
411411 }
412412
413+ @ Test
414+ public void graphGetEdgeCursorByExampleEndVertexRestriction () throws ArangoException {
415+ final TestComplexEntity01 v1 = new TestComplexEntity01 ("Homer" , "A Simpson" , 38 );
416+ final TestComplexEntity01 v2 = new TestComplexEntity01 ("Marge" , "A Simpson" , 36 );
417+ final TestComplexEntity01 v3 = new TestComplexEntity01 ("Bart" , "A Simpson" , 10 );
418+ final TestComplexEntity01 v4 = new TestComplexEntity01 ("Remoh" , "Homer's twin" , 38 );
419+
420+ final VertexEntity <TestComplexEntity01 > vertex1 = driver .graphCreateVertex (GRAPH_NAME , "from1-1" , v1 , true );
421+
422+ final VertexEntity <TestComplexEntity01 > vertex2 = driver .graphCreateVertex (GRAPH_NAME , "to1-1" , v2 , true );
423+
424+ final VertexEntity <TestComplexEntity01 > vertex3 = driver .graphCreateVertex (GRAPH_NAME , "to1-1" , v3 , true );
425+
426+ final VertexEntity <TestComplexEntity01 > vertex4 = driver .graphCreateVertex (GRAPH_NAME , "from1-1" , v4 , true );
427+
428+ driver .graphCreateEdge (GRAPH_NAME , "edge-1" , null , vertex1 .getDocumentHandle (), vertex2 .getDocumentHandle (),
429+ new TestComplexEntity02 (1 , 2 , 3 ), null );
430+
431+ driver .graphCreateEdge (GRAPH_NAME , "edge-1" , null , vertex1 .getDocumentHandle (), vertex3 .getDocumentHandle (),
432+ new TestComplexEntity02 (4 , 5 , 6 ), null );
433+
434+ driver .graphCreateEdge (GRAPH_NAME , "edge-1" , null , vertex4 .getDocumentHandle (), vertex2 .getDocumentHandle (),
435+ new TestComplexEntity02 (7 , 8 , 9 ), null );
436+
437+ GraphEdgesOptions graphEdgesOptions = new GraphEdgesOptions ();
438+ List <String > endVertexCollectionRestriction = new ArrayList <String >();
439+ endVertexCollectionRestriction .add ("to1-1" );
440+ graphEdgesOptions .setEndVertexCollectionRestriction (endVertexCollectionRestriction );
441+
442+ EdgeCursor <TestComplexEntity02 > cursor = driver .graphGetEdgeCursor (GRAPH_NAME , TestComplexEntity02 .class ,
443+ new TestComplexEntity01 (null , "A Simpson" , null ), graphEdgesOptions , getAqlQueryOptions (true , 10 , true ));
444+ assertThat (cursor .getCount (), is (2 ));
445+ }
446+
413447 @ Test
414448 public void shortestPathTest () throws ArangoException {
415449
0 commit comments