LogUtil { public static boolean checkNoError() { if (findLevel(Level.ERROR) == 0) { return true; } else { return false; } }  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);  }
@Test public void testCheckNoError() throws Exception { Log log = mock(Log.class); DubboAppender.logList.add(log); when(log.getLogLevel()).thenReturn(Level.ERROR); assertThat(LogUtil.checkNoError(), is(false)); when(log.getLogLevel()).thenReturn(Level.INFO); assertThat(LogUtil.checkNoError(), is(true)); }