### Question:
FSTFormatter { public String format(Builder builder, String outFileName) { StringBuilder sb = new StringBuilder(); sb.append(formatHeader()); sb.append(formatHashedNodes(builder)); sb.append(formatTrailer()); try { FileWriter fw = new FileWriter(outFileName, false); fw.write(sb.toString()); fw.close(); } catch (IOException e){ System.out.println(e); } return ""; }  String format(Builder builder, String outFileName);  }### Answer:
@Ignore @Test public void testFormat() throws Exception { String inputValues[] = {"cat", "cats", "dog", "dogs", "friday", "friend", "padata"}; int outputValues[] = {0, 1, 2, 3, 4, 20, 42}; Builder builder = new Builder(); builder.build(inputValues, outputValues); FSTFormatter fstFormatter = new FSTFormatter(); fstFormatter.format(builder, "LinearSearchFiniteStateTransducerOutput.txt"); }