@Test
public void testReplace3() throws Exception {

  Diacriticizer diacriticizer = mock(Diacriticizer.class);
  System.setProperty("config.file", "src/test/resources/test.conf");
  ConfigFactory.invalidateCaches();
  final Config config = ConfigFactory.load();
  final String sessionId = "test";
  TalismaneSession.get(sessionId).setDiacriticizer(diacriticizer);
  LowercaseKnownFirstWordFilter filter = new LowercaseKnownFirstWordFilter(sessionId);
  String text = "Georges est là.";
  Sentence sentence = new Sentence(text, sessionId);
  TokenSequence tokenSequence = new TokenSequence(sentence, sessionId);
  tokenSequence.addToken("".length(), "Georges".length());
  tokenSequence.addToken("Georges ".length(), "Georges est".length());
  tokenSequence.addToken("Georges est ".length(), "Georges est là".length());
  tokenSequence.addToken("Georges est là".length(), "Georges est là.".length());
  filter.apply(tokenSequence);
  System.out.println(tokenSequence);
  StringBuilder sb = new StringBuilder();
  for (Token token : tokenSequence) {
    sb.append(token.getText());
    sb.append('|');
  }
  assertEquals("Georges|est|là|.|", sb.toString());
}