/** * Generates a random String that is guaranteed to match the regular expression passed to the * constructor. */ public String generate() { StringBuilder builder = new StringBuilder(); generate(builder, automaton.getInitialState()); return builder.toString(); }