{
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,labels));
Element configToRemove = (Element)StatechumXML.getChildWithTag(learnerConfig,StatechumXML.ELEM_CONSTRAINTS.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,labels));
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(StatechumXML.ELEM_EVALUATIONDATA.name()));
WMethod.checkM(cnf.graph, graph);
Assert.assertEquals(testData, cnf.testSet);Assert.assertEquals(anotherconfig, cnf.config);Assert.assertEquals(cnf.config, cnf.graph.config);
Assert.assertEquals(labels,cnf.labelDetails);
Assert.assertNull(cnf.ifthenSequences);
}