BitemporalMapper extends MultipleColumnMapper { @Override public String toString() { return MoreObjects.toStringHelper(this) .add("field", field) .add("validated", validated) .add("vtFrom", vtFrom) .add("vtTo", vtTo) .add("ttFrom", ttFrom) .add("ttTo", ttTo) .add("pattern", parser.pattern) .add("nowValue", nowValue) .toString(); } BitemporalMapper(String field,
                            Boolean validated,
                            String vtFrom,
                            String vtTo,
                            String ttFrom,
                            String ttTo,
                            String pattern,
                            Object nowValue); @Override List<IndexableField> indexableFields(Columns columns); BitemporalDateTime parseBitemporalDate(Object value); @Override SortField sortField(String name, boolean reverse); @Override String toString(); static final String VT_FROM_FIELD_SUFFIX; static final String VT_TO_FIELD_SUFFIX; static final String TT_FROM_FIELD_SUFFIX; static final String TT_TO_FIELD_SUFFIX; final DateParser parser; }
@Test public void testToString() throws ParseException { BitemporalMapper mapper = bitemporalMapper("vtFrom", "vtTo", "ttFrom", "ttTo").pattern("yyyy/MM/dd") .nowValue("2025/12/23") .build("f"); SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); Date date = format.parse("2025/12/23"); String exp = "BitemporalMapper{field=f, validated=false, vtFrom=vtFrom, vtTo=vtTo, ttFrom=ttFrom, " + "ttTo=ttTo, pattern=yyyy/MM/dd, nowValue=" + date.getTime() + "}"; assertEquals("Method #toString is wrong", exp, mapper.toString()); }