### Question:
LogUtil { public static int findName(String expectedLogName) { int count = 0; List<Log> logList = DubboAppender.logList; for (int i = 0; i < logList.size(); i++) { String logName = logList.get(i).getLogName(); if (logName.contains(expectedLogName)) { count++; } } return count; }  static void start(); static void stop(); static boolean checkNoError(); static int findName(String expectedLogName); static int findLevel(Level expectedLevel); static int findLevelWithThreadName(Level expectedLevel, String threadName); static int findThread(String expectedThread); static int findMessage(String expectedMessage); static int findMessage(Level expectedLevel, String expectedMessage); static void printList(List<T> list);  }### Answer:
@Test public void testFindName() throws Exception { Log log = mock(Log.class); DubboAppender.logList.add(log); when(log.getLogName()).thenReturn("a"); assertThat(LogUtil.findName("a"), equalTo(1)); }