TupleResultBuilder { public TupleResultBuilder namedResult(String name, Object result) throws QueryResultHandlerException { QueryBindingSet bindingSet = new QueryBindingSet(); bindingSet.addBinding(outputNamedResult(name, result)); out.handleSolution(bindingSet); return this; } TupleResultBuilder(QueryResultWriter writer, ValueFactory valueFactory); void prefix(String prefix, String namespace); TupleResultBuilder transform(String path, String xsl); TupleResultBuilder start(String... variables); TupleResultBuilder startBoolean(); TupleResultBuilder variables(String... names); TupleResultBuilder link(List<String> url); TupleResultBuilder bool(boolean result); TupleResultBuilder result(Object... result); TupleResultBuilder namedResult(String name, Object result); TupleResultBuilder end(); TupleResultBuilder endBoolean(); void flush();  }
@Test public final void testSES1726regression() throws Exception { TupleResultBuilder builder = new TupleResultBuilder(new SPARQLResultsJSONWriter(new ByteArrayOutputStream()), SimpleValueFactory.getInstance()); try { builder.namedResult("test", new URL("http: fail("Did not receive expected exception for calling namedResult before start"); } catch (IllegalStateException ise) { } }