### Question:
LocalSnapshotStorage implements SnapshotStorage { public long getLastSnapshotIndex() { this.lock.lock(); try { return this.lastSnapshotIndex; } finally { this.lock.unlock(); } } LocalSnapshotStorage(String path, RaftOptions raftOptions); @Override void setSnapshotThrottle(SnapshotThrottle snapshotThrottle); boolean hasServerAddr(); void setServerAddr(Endpoint addr); long getLastSnapshotIndex(); @Override boolean init(final Void v); @Override void shutdown(); @Override boolean setFilterBeforeCopyRemote(); @Override SnapshotWriter create(); SnapshotWriter create(final boolean fromEmpty); @Override SnapshotReader open(); @Override SnapshotReader copyFrom(final String uri, final SnapshotCopierOptions opts); @Override SnapshotCopier startToCopyFrom(final String uri, final SnapshotCopierOptions opts);  }### Answer:
@Test public void testGetLastSnapshotIndex() throws Exception { assertEquals(this.snapshotStorage.getLastSnapshotIndex(), lastSnapshotIndex); assertEquals(1, this.snapshotStorage.getRefs(this.lastSnapshotIndex).get()); }