//The test here is whether the model works
Boolean[] expResult = new Boolean[]{true, true, false, false};
Double[] expConfidence = new Double[]{1.0, 1.0, 0.0, 0.0};
ExampleSet examples = new ExampleSet(testInstances);
Predictions predictions = model.getPredictions(examples);
assertEquals(expResult.length, predictions.size());
for (int i = 0; i < expResult.length; i++) {
assertEquals(expResult[i], predictions.getPredictedLabel(i));
assertEquals(expConfidence[i], predictions.getPredictionConfidence(i));
assertEquals(testInstances.get(i).classValue(), predictions.getTrueLabel(i) ? 1.0 : 0.0, 0.0);
}
}