GeoPointMapper extends MultipleColumnMapper { @Override public String toString() { return MoreObjects.toStringHelper(this) .add("field", field) .add("validated", validated) .add("latitude", latitude) .add("longitude", longitude) .add("maxLevels", maxLevels) .toString(); } GeoPointMapper(String field, Boolean validated, String latitude, String longitude, Integer maxLevels); @Override List<IndexableField> indexableFields(Columns columns); @Override SortField sortField(String name, boolean reverse); @Override String toString(); static final int DEFAULT_MAX_LEVELS; final String latitude; final String longitude; final int maxLevels; final CompositeSpatialStrategy strategy; }
@Test public void testToString() { GeoPointMapper mapper = geoPointMapper("lat", "lon").validated(true).maxLevels(7).build("field"); String exp = "GeoPointMapper{field=field, validated=true, latitude=lat, longitude=lon, maxLevels=7}"; assertEquals("Method #toString is wrong", exp, mapper.toString()); }