### Question:
ConstantFieldBoost implements FieldBoost { @Override public int hashCode() { return (boost != +0.0f ? Float.floatToIntBits(boost) : 0); } ConstantFieldBoost(float boost); @Override float getBoost(String fieldname, IndexReader indexReader); @Override void registerTermSubQuery(String fieldname,
                                     TermSubQueryFactory termSubQueryFactory,
                                     querqy.model.Term sourceTerm); @Override String toString(String fieldname); @Override boolean equals(Object o); @Override int hashCode(); static final ConstantFieldBoost NORM_BOOST; }### Answer:
@Test public void testThatHashCodeDependsOnBoostFactor() throws Exception { ConstantFieldBoost fieldBoost1 = new ConstantFieldBoost(1f); ConstantFieldBoost fieldBoost1a = new ConstantFieldBoost(1f); ConstantFieldBoost fieldBoost2 = new ConstantFieldBoost(2f); assertEquals(fieldBoost1.hashCode(), fieldBoost1a.hashCode()); assertNotEquals(fieldBoost1.hashCode(), fieldBoost2.hashCode()); }