### Question:
WordCompare { public static String wdiff(String first, String second) { MinimalPerfectHash mph = new MinimalPerfectHash(false); TokenArray a1 = new TokenArray(mph, first); TokenArray a2 = new TokenArray(mph, second); EditTable B = align(a1, a2); StringBuilder builder = new StringBuilder(); int l1 = a1.length(); int l2 = a2.length(); int i = l1; int j = l2; while (i > 0 && j > 0) { switch (B.get(i, j)) { case KEEP: builder.append(a1.wordAt(l1 - i)).append(" = ") .append(a2.wordAt(l2 - j)).append('\n'); --i; --j; break; case DELETE: builder.append(a1.wordAt(l1 - i)).append(" # []\n"); --i; break; case INSERT: builder.append("[] # ") .append(a2.wordAt(l2 - j)).append('\n'); --j; break; case SUBSTITUTE: builder.append(a1.wordAt(l1 - i)) .append(" # ").append(a2.wordAt(l2 - j)).append('\n'); --i; --j; break; } } if (i > 0) { builder.append(a1.wordAt(l1 - i)).append(" # []\n"); --i; } if (j > 0) { builder.append("[] # ") .append(a2.wordAt(l2 - j)).append('\n'); --j; } return builder.toString(); }  static String wdiff(String first, String second);  }### Answer:
@Test public void testWdiff() { System.out.println("wdiff"); String first = "one to just one"; String second = "to see one"; String expResult = "one # []\nto = to\njust # see\none = one\n"; String result = WordCompare.wdiff(first, second); assertEquals(expResult, result); }