DateMapper extends SingleColumnMapper.SingleFieldMapper<Long> { @Override public String toString() { return toStringHelper(this).add("pattern", parser).toString(); } DateMapper(String field, String column, Boolean validated, String pattern); @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(); final DateParser parser; }
@Test public void testToString() { DateMapper mapper = dateMapper().validated(true).pattern("yyyyMMdd").build("name"); assertEquals("Method #toString is wrong", "DateMapper{field=name, validated=true, column=name, pattern=yyyyMMdd}", mapper.toString()); }