TextTokenizer extends TextTokenizerBase { public static TextTokenizer getInstance() throws ClassNotFoundException, InstantiationException, IllegalAccessException { return LazyHolder.INSTANCE; } private  TextTokenizer(); static TextTokenizer getInstance();  }
@Test public void testGetListTokens() throws ClassNotFoundException, InstantiationException, IllegalAccessException { final TextTokenizer defaultTextTokenizer = TextTokenizer.getInstance(); for (String text : textsWithExpectedTokens.keySet()) { assertEquals(textsWithExpectedTokens.get(text), defaultTextTokenizer.getListTokens(text)); } }
@Test public void testGetTokenizedString() throws ClassNotFoundException, InstantiationException, IllegalAccessException { final String delimiter = " "; final TextTokenizer defaultTextTokenizer = TextTokenizer.getInstance(); for (String text : textsWithExpectedTokenizedString.keySet()) { assertEquals(textsWithExpectedTokenizedString.get(text), defaultTextTokenizer.getTokenizedString(text)); assertEquals(textsWithExpectedTokenizedString.get(text), defaultTextTokenizer.getTokenizedString(text, delimiter)); } }