private void setOutput(Automaton outputAutomaton) throws SerializationException {
   if (isXmlInstance()) {
     setOutput(automatonService.automatonToXml(outputAutomaton));
   } else {
     setOutput(automatonService.automatonToJson(outputAutomaton));
   }
 }
 private Automaton getInputAutomaton() throws SerializationException {
   if (isXmlInstance()) {
     return automatonService.automatonFrom(getXmlInput());
   } else {
     return automatonService.automatonFrom(getJsonInput());
   }
 }