Converters { public static Node checkVar(Node n ) { if (n.isVariable()) { return Var.alloc( n ); } return n; } private  Converters(); static Node checkVar(Node n ); static Node makeLiteral(Object o); static Node makeLiteral(String value, String typeUri); static Node makeNode(Object o, PrefixMapping pMapping); static Object makeNodeOrPath(Object o, PrefixMapping pMapping); static Var makeVar(Object o); static String quoted(String q); static Collection<Node> makeValueNodes( Iterator<?> iter, PrefixMapping prefixMapping );  }
@Test public void checkVarTest() { Node n = Converters.checkVar( Node.ANY ); assertFalse( n instanceof Var ); n = Converters.checkVar(NodeFactory.createVariable( "myVar")); assertTrue( n instanceof Var ); }