private ExprNodeGenericFuncDesc getFuncDesc(String xmlSerialized) {
    byte[] bytes = xmlSerialized.getBytes(StandardCharsets.UTF_8);

    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
    XMLDecoder decoder = new XMLDecoder(bais, null, null);

    try {
      return (ExprNodeGenericFuncDesc) decoder.readObject();
    } finally {
      decoder.close();
    }
  }
These tests cover the conversion from Hive's AST to SearchArguments.
ql/src/test/org/apache/hadoop/hive/ql/io/sarg/TestConvertAstToSearchArg.java