SchemaAnalyzer extends DelegatingAnalyzerWrapper { @Override public String toString() { return MoreObjects.toStringHelper(this) .add("defaultAnalyzer", defaultAnalyzer) .add("fieldAnalyzers", fieldAnalyzers) .toString(); } SchemaAnalyzer(Analyzer defaultAnalyzer, Map<String, Analyzer> analyzers, Map<String, Mapper> mappers); TokenLengthAnalyzer getDefaultAnalyzer(); TokenLengthAnalyzer getAnalyzer(String fieldName); @Override String toString();  }
@Test public void testToString() { Analyzer defaultAnalyzer = new EnglishAnalyzer(); Map<String, Mapper> mappers = new HashMap<>(); mappers.put("mapper", stringMapper().build("mapper")); Map<String, Analyzer> analyzers = new HashMap<>(); SchemaAnalyzer schemaAnalyzer = new SchemaAnalyzer(defaultAnalyzer, analyzers, mappers); assertNotNull("Expected not null schema", schemaAnalyzer.toString()); }