@Test
  public void testWALTrailer() throws IOException {
    // make sure that the size for WALTrailer is 0, we need this assumption when reading partial
    // WALTrailer
    assertEquals(0, WALTrailer.newBuilder().build().getSerializedSize());
    // read With trailer.
    doRead(true);
    // read without trailer
    doRead(false);
  }
Reads the WAL with and without WALTrailer.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestProtobufLog.java