code: public void expectLogMessage(int level, String tag, String message) {
      checkTag(tag);
      expectedLogs.add(new LogItem(level, tag, message, null));
    }
docs: Adds an expected log statement. If this log is not printed during test execution, the test case
  will fail. Do not use this to suppress failures. Use this to test that expected error cases in
  your code cause log messages to be printed.