private RegexNode parse(String regex) throws RegexParsingException {
    RegexTreeTransformer parser = RegexTreeTransformer.parse(regex);
    RegexNode tree = parser.getRegexTree();

    debug(regex, parser, tree);
    return tree;
  }
 @Test(expected = RegexParsingException.class)
 public void invalidInput() throws RegexParsingException {
   RegexTreeTransformer.parse(")I'm(invalid+input*");
 }