### Question:
DocumentSearch { public static int solve(List<String> documents, List<String> queryWords) { return 0; }  static int solve(List<String> documents, List<String> queryWords);  }### Answer:
@Test public void basicTest() { List<String> document = convert("abcdebdde"); List<String> query = convert("bde"); Assert.assertEquals(4, DocumentSearch.solve(document, query)); }
@Test public void basicTest2() { List<String> document = convert("hpsrhgogezyfrwfrejytjkzvgpjnqil"); List<String> query = convert("ggj"); Assert.assertEquals(13, DocumentSearch.solve(document, query)); }
@Test public void basicTest3() { List<String> document = convert("jmeqksfrsdcmsiwvaovztaqenprpvnbstl"); List<String> query = convert("m"); Assert.assertEquals(1, DocumentSearch.solve(document, query)); }
@Test public void basicTest4() { List<String> document = convert("wcbsuiyzacfgrqsqsnodwmxzkz"); List<String> query = convert("xwqe"); Assert.assertEquals(-1, DocumentSearch.solve(document, query)); }
@Test public void randomTest() { int N = 1000, n = 500, m = 100; for (int i = 0; i < N; i++) { String document = randomString(1 + r.nextInt(n)); String query = randomString(1 + r.nextInt(m)); List<String> documents = convert(document); List<String> querys = convert(query); Assert.assertEquals(expect2(document, query), DocumentSearch.solve(documents, querys)); } }