StringsClusterAnalyzer implements Serializable { public List<StringClusters> getResult() { List<StringClusters> cluster = new ArrayList<>(); cluster.add(stringClusters); return cluster; }  void setBlockSizeThreshold(int blockSizeThreshold); void withPostMerges(PostMerge... postMerges); void init(); boolean analyze(String... record); void end(); List<StringClusters> getResult();  }
@Test public void testGetResult() throws IOException { analyser.init(); String columnDelimiter = "|"; InputStream in = this.getClass().getResourceAsStream("incoming_customers_swoosh_fingerprintkey.txt"); BufferedReader bfr = new BufferedReader(new InputStreamReader(in)); List<String> listOfLines = IOUtils.readLines(bfr); for (String line : listOfLines) { String[] fields = StringUtils.splitPreserveAllTokens(line, columnDelimiter); analyser.analyze(fields[1]); } analyser.end(); List<StringClusters> results = analyser.getResult(); assertElementResult(results.get(0)); }