@Test
    public void testSaveFail() throws IOException {
        FileUtils.deleteDirectory(new File(this.path));
        assertFalse(this.raftMetaStorage.setVotedFor(new PeerId("localhost", 8081)));
        Mockito.verify(this.node, Mockito.times(1)).onError((RaftException) Mockito.any());
    }
@author boyan (boyan@alibaba-inc.com)

2018-Apr-11 4:50:23 PM
jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/LocalRaftMetaStorageTest.java