@Override
      public Void run() throws Exception {
        Path p = runWALSplit(newConf);
        LOG.info("WALSplit path == " + p);
        // Make a new wal for new region open.
        final WALFactory wals2 = new WALFactory(conf,
          ServerName
            .valueOf(currentTest.getMethodName() + "2", 16010, EnvironmentEdgeManager.currentTime())
            .toString());
        WAL wal2 = wals2.getWAL(null);
        HRegion region = HRegion.openHRegion(newConf, FileSystem.get(newConf), hbaseRootDir, hri,
          htd, wal2, TEST_UTIL.getHBaseCluster().getRegionServer(0), null);

        SampleRegionWALCoprocessor cp2 =
          region.getCoprocessorHost().findCoprocessor(SampleRegionWALCoprocessor.class);
        assertNotNull(cp2);
        assertTrue(cp2.isPreReplayWALsCalled());
        assertTrue(cp2.isPostReplayWALsCalled());
        region.close();
        wals2.close();
        return null;
      }
Test WAL replay behavior with WALObserver.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java