QueryResults extends Iterations { public static Model asModel(CloseableIteration<? extends Statement, ? extends RDF4JException> iteration) throws QueryEvaluationException { return asModel(iteration, new DynamicModelFactory()); }  static Model asModel(CloseableIteration<? extends Statement, ? extends RDF4JException> iteration); static Model asModel(CloseableIteration<? extends Statement, ? extends RDF4JException> iteration,
			ModelFactory modelFactory); static List<Value> getAllValues(TupleQueryResult result, String var); static Statement singleResult(GraphQueryResult result); static BindingSet singleResult(TupleQueryResult result); static GraphQueryResult distinctResults(GraphQueryResult queryResult); static TupleQueryResult distinctResults(TupleQueryResult queryResult); static TupleQueryResult limitResults(TupleQueryResult queryResult, long limit, long offset); static GraphQueryResult limitResults(GraphQueryResult queryResult, long limit, long offset); static GraphQueryResult parseGraphBackground(InputStream in, String baseURI, RDFFormat format); static GraphQueryResult parseGraphBackground(InputStream in, String baseURI, RDFParser parser); static void report(TupleQueryResult tqr, QueryResultHandler handler); static void report(GraphQueryResult gqr, RDFHandler rdfHandler); static boolean equals(TupleQueryResult tqr1, TupleQueryResult tqr2); static boolean isSubset(TupleQueryResult tqr1, TupleQueryResult tqr2); static boolean equals(GraphQueryResult result1, GraphQueryResult result2); static boolean bindingSetsCompatible(BindingSet bs1, BindingSet bs2);  }
@Test public void testAsModel() throws QueryEvaluationException { Model model = QueryResults.asModel(gqr); assertFalse(gqr.hasNext()); assertNotNull(model); assertTrue(model.contains(VF.createStatement(a, p, b))); }