assertEquals("#$%@#^%&", new String(token.termBuffer(), 0, token
.termLength()));
}
public void testNonConvertableStringsWithoutInject() throws Exception {
TokenStream stream = new IterTokenStream(
new String[] { "12345", "#$%@#^%&" });
TokenStream filter = new DoubleMetaphoneFilter(stream, 8, false);
assertEquals("12345", filter.next(new Token()).term());
// should have something after the stream
stream = new IterTokenStream(
new String[] { "12345", "#$%@#^%&", "hello" });
filter = new DoubleMetaphoneFilter(stream, 8, false);
assertNotNull(filter.next(new Token()));
}