DatasetHandler implements Handler { public void from(String graphName) { query.addGraphURI(graphName); } DatasetHandler(Query query); void addAll(DatasetHandler datasetHandler); void fromNamed(String graphName); void fromNamed(Collection<String> graphNames); void from(String graphName); void from(Collection<String> graphNames); @Override void setVars(Map<Var, Node> values); @Override void build();  }
@Test public void fromString() { handler.from("foo"); assertTrue(query.toString().contains("FROM <foo>")); }
@Test public void fromStringCollection() { String[] names = { "foo", "bar" }; handler.from(Arrays.asList(names)); assertTrue(query.toString().contains("FROM <foo>")); assertTrue(query.toString().contains("FROM <bar>")); }