DeDotFieldNameConverter implements FieldNameConverter, Serializable { @Override public String convert(String originalField) { String newField = originalField.replace(".",":"); if(LOG.isDebugEnabled() && originalField.contains(".")) { LOG.debug("Renamed dotted field; original={}, new={}", originalField, newField); } return newField; }  @Override String convert(String originalField);  }
@Test public void testWithColons() throws Exception { String actual = new DeDotFieldNameConverter().convert("testfield.with.colons"); assertEquals("testfield:with:colons", actual); }
@Test public void testNoColons() throws Exception { String actual = new DeDotFieldNameConverter().convert("test-field-no-colons"); assertEquals("test-field-no-colons", actual); }