LongMapper extends SingleColumnMapper.SingleFieldMapper<Long> { @Override public String toString() { return toStringHelper(this).add("boost", boost).toString(); } LongMapper(String field, String column, Boolean validated, Float boost); @Override Optional<Field> indexedField(String name, Long value); @Override Optional<Field> sortedField(String name, Long value); @Override SortField sortField(String name, boolean reverse); @Override String toString(); static final Float DEFAULT_BOOST; final Float boost; }
@Test public void testToString() { LongMapper mapper = longMapper().boost(1f).validated(true).build("field"); assertEquals("Method #toString is wrong", "LongMapper{field=field, validated=true, column=field, boost=1.0}", mapper.toString()); }