### Question:
DecisionForest implements TreeBasedClassifier { @Override public String toString() { StringBuilder result = new StringBuilder(); for (DecisionTree tree : trees) { result.append(tree).append('\n'); } return result.toString(); } DecisionForest(DecisionTree[] trees, double[] weights, double[] featureImportances); DecisionTree[] getTrees(); double[] getWeights(); double[] getFeatureImportances(); @Override Prediction predict(Example test); @Override void update(Example train); @Override String toString();  }### Answer:
@Test public void testToString() { String s = buildTestForest().toString(); assertTrue(s.startsWith("(#0 >= 1.0)")); assertContains(s, "(#0 >= -1.0)"); }