### Question:
AdditiveBoostFunction extends ValueSource { @Override public int hashCode() { return Float.hashCode(boostValue) + scoringFunction.hashCode(); } AdditiveBoostFunction(final ValueSource scoringFunction, final float boost); @Override FunctionValues getValues(final Map context, final LeafReaderContext readerContext); @Override boolean equals(final Object o); @Override int hashCode(); @Override String description();  }### Answer:
@Test public void testHashCode() { final AdditiveBoostFunction func1 = new AdditiveBoostFunction(new DoubleConstValueSource(Math.PI), 1f); final AdditiveBoostFunction func2 = new AdditiveBoostFunction(new DoubleConstValueSource(Math.PI), 1f); final AdditiveBoostFunction func3 = new AdditiveBoostFunction(new DoubleConstValueSource(Math.E), 1f); final AdditiveBoostFunction func4 = new AdditiveBoostFunction(new DoubleConstValueSource(Math.E), 2f); assertEquals(func1.hashCode(), func2.hashCode()); assertNotEquals(func2.hashCode(), func3.hashCode()); assertNotEquals(func3.hashCode(), func4.hashCode()); }