### Question:
FileTxnSnapLog { public void close() throws IOException { if (txnLog != null) { txnLog.close(); txnLog = null; } if (snapLog != null) { snapLog.close(); snapLog = null; } } FileTxnSnapLog(File dataDir, File snapDir); void setServerStats(ServerStats serverStats); File getDataDir(); File getSnapDir(); SnapshotInfo getLastSnapshotInfo(); long restore(DataTree dt, Map<Long, Integer> sessions, PlayBackListener listener); long fastForwardFromEdits(
        DataTree dt,
        Map<Long, Integer> sessions,
        PlayBackListener listener); TxnIterator readTxnLog(long zxid); TxnIterator readTxnLog(long zxid, boolean fastForward); void processTransaction(
        TxnHeader hdr,
        DataTree dt,
        Map<Long, Integer> sessions,
        Record txn); long getLastLoggedZxid(); void save(
        DataTree dataTree,
        ConcurrentHashMap<Long, Integer> sessionsWithTimeouts,
        boolean syncSnap); boolean truncateLog(long zxid); File findMostRecentSnapshot(); List<File> findNRecentSnapshots(int n); List<File> findNValidSnapshots(int n); File[] getSnapshotLogs(long zxid); boolean append(Request si); void commit(); long getTxnLogElapsedSyncTime(); void rollLog(); void close(); void setTotalLogSize(long size); long getTotalLogSize(); static final int VERSION; static final String version; static final String ZOOKEEPER_DATADIR_AUTOCREATE; static final String ZOOKEEPER_DATADIR_AUTOCREATE_DEFAULT; static final String ZOOKEEPER_SNAPSHOT_TRUST_EMPTY; }### Answer:
@Test public void testACLCreatedDuringFuzzySnapshotSync() throws IOException { DataTree leaderDataTree = new DataTree(); File file = File.createTempFile("snapshot", "zk"); FileOutputStream os = new FileOutputStream(file); OutputArchive oa = BinaryOutputArchive.getArchive(os); leaderDataTree.serializeAcls(oa); TxnHeader hdr1 = new TxnHeader(1, 2, 2, 2, ZooDefs.OpCode.create); Record txn1 = new CreateTxn("/a1", "foo".getBytes(), ZooDefs.Ids.CREATOR_ALL_ACL, false, -1); leaderDataTree.processTxn(hdr1, txn1); leaderDataTree.serializeNodes(oa); os.close(); FileInputStream is = new FileInputStream(file); InputArchive ia = BinaryInputArchive.getArchive(is); DataTree followerDataTree = new DataTree(); followerDataTree.deserialize(ia, "tree"); followerDataTree.processTxn(hdr1, txn1); DataNode a1 = leaderDataTree.getNode("/a1"); assertNotNull(a1); assertEquals(ZooDefs.Ids.CREATOR_ALL_ACL, leaderDataTree.getACL(a1)); assertEquals(ZooDefs.Ids.CREATOR_ALL_ACL, followerDataTree.getACL(a1)); }