### Question:
LocalSnapshotWriter extends SnapshotWriter { @Override public void close() throws IOException { close(false); } LocalSnapshotWriter(String path, LocalSnapshotStorage snapshotStorage, RaftOptions raftOptions); @Override boolean init(final Void v); long getSnapshotIndex(); @Override void shutdown(); @Override void close(); @Override void close(final boolean keepDataOnError); @Override boolean saveMeta(final SnapshotMeta meta); boolean sync(); @Override boolean addFile(final String fileName, final Message fileMeta); @Override boolean removeFile(final String fileName); @Override String getPath(); @Override Set<String> listFiles(); @Override Message getFileMeta(final String fileName);  }### Answer:
@Test public void testClose() throws Exception { this.writer.close(); Mockito.verify(this.snapshotStorage, Mockito.only()).close(this.writer, false); }