### Question:
Batch { private String lcp(File[] files) { if (files.length > 0) { String result = files[0].getName(); for (int n = 1; n < files.length; ++n) { result = prefix(result, files[n].getName()); } return result; } else { return null; } } Batch(File dir1, File dir2);  Batch(Iterable<Path> transcriptions, Path ocrDir); int size(); Pair<File, File> pair(int n); static String lcs(File[] files);  }### Answer:
@Test public void testLcp() { System.out.println("lcp"); String s1 = "compare"; String s2 = "competence"; String expResult = "comp"; String result = Batch.prefix(s1, s2); assertEquals(expResult, result); }