@NonNull public static synchronized String getAllLogLines() {
    ArrayList<String> lines = getAllLogLinesList();
    // now to build the string
    StringBuilder sb = new StringBuilder("Log contains " + lines.size() + " lines:");
    while (lines.size() > 0) {
      String line = lines.remove(lines.size() - 1);
      sb.append(NEW_LINE);
      sb.append(line);
    }
    return sb.toString();
  }
@Test
  public void testGetAllLogLines() throws Exception {
    Logger.d("mTag", "Text1");

    final String expectedFirstLine = "-D-[mTag] Text1";

    Assert.assertTrue(Logger.getAllLogLines().endsWith(expectedFirstLine));
  }