{
String anotherXML = null;
{
ByteArrayOutputStream output = new ByteArrayOutputStream();
RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
Element learnerConfig = dumper.writeLearnerEvaluationConfiguration(new LearnerEvaluationConfiguration(graph,testData,anotherconfig,ltl));
Element configToRemove = (Element)learnerConfig.getElementsByTagName(ELEM_KINDS.ELEM_LTL.name()).item(0);
org.w3c.dom.Node crlf = configToRemove.getNextSibling();
learnerConfig.removeChild(configToRemove);learnerConfig.removeChild(crlf);
dumper.topElement.appendChild(learnerConfig);dumper.close();xmlData = output.toString();
}
{
ByteArrayOutputStream output = new ByteArrayOutputStream();
RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,Configuration.getDefaultConfiguration(),false);
Element learnerConfig = dumper.writeLearnerEvaluationConfiguration(new LearnerEvaluationConfiguration(graph,testData,anotherconfig,null));
dumper.topElement.appendChild(learnerConfig);dumper.close();anotherXML = output.toString();
}
Assert.assertEquals(anotherXML,xmlData);
LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
LearnerEvaluationConfiguration cnf=ProgressDecorator.readLearnerEvaluationConfiguration(loader.expectNextElement(ELEM_KINDS.ELEM_EVALUATIONDATA.name()));
TestFSMAlgo.checkM(new FSMStructure(cnf.graph,null), new FSMStructure(graph,null));
Assert.assertEquals(testData, cnf.testSet);Assert.assertEquals(anotherconfig, cnf.config);
Assert.assertNull(cnf.ltlSequences);
}