### Question:
NumericPrediction extends Prediction { @Override public void update(Example train) { NumericFeature target = (NumericFeature) train.getTarget(); update(target.getValue(), 1); } NumericPrediction(double prediction, int initialCount); double getPrediction(); @Override FeatureType getFeatureType(); @Override void update(Example train); synchronized void update(double newPrediction, int newCount); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testUpdate() { NumericPrediction prediction = new NumericPrediction(1.5, 1); Example example = new Example(NumericFeature.forValue(2.5)); prediction.update(example); assertEquals(2.0, prediction.getPrediction()); }