question: public void test_service_004 ( ) throws Exception { final BigdataURI serviceURI = valueFactory . createURI ( "http://www.bigdata.com/myService" ) ; final GraphPatternGroup < IGroupMemberNode > groupNode = new JoinGroupNode ( ) ; { groupNode . addChild ( new StatementPatternNode ( new VarNode ( "s" ) , new VarNode ( "p" ) , new VarNode ( "o" ) ) ) ; } final String exprImage = "SERVICE <" + serviceURI + "> { ?s ?p ?o }" ; final Map < String , String > prefixDecls = new LinkedHashMap < String , String > ( PrefixDeclProcessor . defaultDecls ) ; final ServiceNode serviceNode = new ServiceNode ( new ConstantNode ( makeIV ( serviceURI ) ) , groupNode ) ; { final Set < IVariable < ? > > projectedVars = new LinkedHashSet < IVariable < ? > > ( ) ; { projectedVars . add ( Var . var ( "s" ) ) ; projectedVars . add ( Var . var ( "p" ) ) ; projectedVars . add ( Var . var ( "o" ) ) ; } serviceNode . setExprImage ( exprImage ) ; serviceNode . setPrefixDecls ( prefixDecls ) ; serviceNode . setProjectedVars ( projectedVars ) ; } final List < BindingSet > bindingSets = new LinkedList < BindingSet > ( ) ; { final MapBindingSet bset = new MapBindingSet ( ) ; bset . addBinding ( "s" , new BNodeImpl ( "abc" ) ) ; bindingSets . add ( bset ) ; } final BindingSet [ ] a = bindingSets . toArray ( new BindingSet [ bindingSets . size ( ) ] ) ; final IRemoteSparqlQueryBuilder fixture = newFixture ( serviceNode , a ) ; final String queryStr = fixture . getSparqlQuery ( a ) ; final QueryRoot expected = new QueryRoot ( QueryType . SELECT ) ; { expected . setPrefixDecls ( prefixDecls ) ; final ProjectionNode projection = new ProjectionNode ( ) ; projection . addProjectionVar ( new VarNode ( "s" ) ) ; projection . addProjectionVar ( new VarNode ( "p" ) ) ; projection . addProjectionVar ( new VarNode ( "o" ) ) ; expected . setProjection ( projection ) ; final JoinGroupNode whereClause = new JoinGroupNode ( ) ; whereClause . addChild ( new StatementPatternNode ( new VarNode ( "s" ) , new VarNode ( "p" ) , new VarNode ( "o" ) , null , Scope . DEFAULT_CONTEXTS ) ) ; expected . setWhereClause ( whereClause ) ; { final LinkedHashSet < IVariable < ? > > vars = new LinkedHashSet < IVariable < ? > > ( ) ; final List < IBindingSet > solutionsIn = new LinkedList < IBindingSet > ( ) ; final BindingsClause bindingsClause = new BindingsClause ( vars , solutionsIn ) ; expected . setBindingsClause ( bindingsClause ) ; { vars . add ( Var . var ( "s" ) ) ; } { final ListBindingSet bset = new ListBindingSet ( ) ; solutionsIn . add ( bset ) ; } } } final QueryRoot actual = parse ( queryStr , baseURI ) ; assertSameAST ( queryStr , expected , actual ) ; }
target:  A variant test in there is a blank node in the BINDINGS to be flowed through to the remote SERVICE.  In this test the blank nodes are not correlated so we do not need to impose a FILTER on the remote service.