### Question:
Prune_Ram_SortedCsv { public void prune() throws IOException { openInCsvReader(); readInCsvHeader(); HashMap<String, Integer> vocabulary = new HashMap<String, Integer>(); Integer numberOfDocuments = 0; String documentId = new String(); HashSet<String> documentTerms = new HashSet<String>(); while (inCsvReadRecord()) { String term = inCsv.get("TERM"); if (!documentId.equals(inCsv.get("DOCUMENT_ID"))) { documentId = inCsv.get("DOCUMENT_ID"); numberOfDocuments++; for (String t : documentTerms) { if (vocabulary.containsKey(t)) { Integer frequency = vocabulary.get(t); frequency++; vocabulary.put(t, frequency); } else { vocabulary.put(t, 1); } } documentTerms.clear(); documentTerms.add(term); } else { documentTerms.add(term); } } float upperBound = numberOfDocuments * upperBoundPercent / (float) 100.0; float lowerBound = numberOfDocuments * lowerBoundPercent / (float) 100.0; HashSet<String> termsToKeep = new HashSet<String>(); for (String term : vocabulary.keySet()) { if (vocabulary.get(term) > lowerBound && vocabulary.get(term) < upperBound) { termsToKeep.add(term); } } System.out.println("Number of Documents " + numberOfDocuments); closeInCsvReader(); FileOutputStream outCsvStream = new FileOutputStream(inFilePath + ".pruned.Lower." + lowerBound + ".Upper." + upperBound + ".csv"); CsvWriter outCsv = new CsvWriter(outCsvStream, ';', Charset.forName("UTF-8")); outCsv.setForceQualifier(true); openInCsvReader(); readInCsvHeader(); outCsv.writeRecord(headerEntries); while (inCsv.readRecord()) { String term = inCsv.get("TERM"); if (termsToKeep.contains(term)) { outCsv.writeRecord(inCsv.getValues()); } } closeInCsvReader(); outCsv.close(); this.renameFile(inFilePath, inFilePath + ".org." + System.currentTimeMillis()); this.renameFile(inFilePath + ".pruned.Lower." + lowerBound + ".Upper." + upperBound + ".csv", inFilePath); }  void setLogger(Logger logger); void prune();  }### Answer:
@Test public void testPrune() { Prune_Ram_SortedCsv myPrune = new Prune_Ram_SortedCsv(); String inFilePath = this.getClass().getResource("/db.csv").getFile(); myPrune.setInFilePath(inFilePath); myPrune.setLowerAndUpperBoundPercent(6, 94); try { myPrune.prune(); } catch (IOException e) { e.printStackTrace(); } }