public void testGetResult() throws Exception {
PhoneticSimilarityFinder analyzer = new PhoneticSimilarityFinder(col);
// 4 similar sounding kasper's
analyzer.run(new MockInputRow().put(col, "kasper"), 1);
analyzer.run(new MockInputRow().put(col, "gasper"), 1);
analyzer.run(new MockInputRow().put(col, "qasper"), 1);
analyzer.run(new MockInputRow().put(col, "kaspar"), 1);
// 3 similar sounding hello's
analyzer.run(new MockInputRow().put(col, "hello"), 1);
analyzer.run(new MockInputRow().put(col, "hallo"), 1);
analyzer.run(new MockInputRow().put(col, "hellow"), 1);
// something without similarities
analyzer.run(new MockInputRow().put(col, "wowsers"), 1);
SimilarityResult result = analyzer.getResult();
assertEquals(3, result.getSimilarValues("kasper").size());
assertEquals("[gasper, kaspar, qasper]", result.getSimilarValues("kasper").toString());