GeoShapeMapper extends SingleColumnMapper<String> { @Override public String toString() { return MoreObjects.toStringHelper(this) .add("field", field) .add("column", column) .add("validated", validated) .add("maxLevels", maxLevels) .add("transformations", transformations) .toString(); } GeoShapeMapper(String field,
                          String column,
                          Boolean validated,
                          Integer maxLevels,
                          List<GeoTransformation> transformations); @Override List<IndexableField> indexableFields(String name, String value); @Override SortField sortField(String name, boolean reverse); @Override String toString(); static final int DEFAULT_MAX_LEVELS; final String column; final int maxLevels; final CompositeSpatialStrategy strategy; final List<GeoTransformation> transformations; }
@Test public void testToString() { GeoShapeMapper mapper = geoShapeMapper().validated(true) .column("column") .maxLevels(10) .transformations(new Centroid(), new BBox()) .build("field"); String exp = "GeoShapeMapper{field=field, column=column, validated=true, maxLevels=10, " + "transformations=[Centroid{}, BBox{}]}"; assertEquals("Method #toString is wrong", exp, mapper.toString()); }