String sequence = "";
infile.readLine();
sequence = infile.readLine();
sequence = sequence.toUpperCase();
ClassifierSequence pSeq = new ClassifierSequence("name", "title", sequence);
ClassificationResult result = aClassifier.classify(pSeq);
Iterator it = result.getAssignments().iterator();
RankAssignment classResult = (RankAssignment) it.next();
assertEquals(classResult.getBestClass().getName() , rootTree.getName());
assertEquals(classResult.getConfidence(), 1.0, 0.1);
classResult = (RankAssignment) it.next();
assertEquals(classResult.getBestClass().getName() , "Proteobacteria");
it.next();
classResult = (RankAssignment) it.next();
assertEquals(classResult.getBestClass().getName() , "Rhizobiales");
it.next();
classResult = (RankAssignment) it.next();
assertEquals(classResult.getBestClass().getName() , "Rhizobium");
//displayResult(result);
// end of test first sequence
// test the second sequence
infile.readLine();
sequence = infile.readLine();
sequence = sequence.toUpperCase();
pSeq = new ClassifierSequence("name", "title", sequence);
result = aClassifier.classify(pSeq);
it = result.getAssignments().iterator();
classResult = (RankAssignment) it.next();
assertEquals(classResult.getBestClass().getName() , rootTree.getName());
assertEquals(classResult.getConfidence(), 1.0, 0.1);
classResult = (RankAssignment) it.next();
assertEquals(classResult.getBestClass().getName() , "Firmicutes");