@Test
public void testSetFilePermissionsException() throws IOException {

    ZMSFileChangeLogStoreCommon fstore = new ZMSFileChangeLogStoreCommon(FSTORE_PATH);
    FilesHelper helper = Mockito.mock(FilesHelper.class);
    Mockito.when(helper.setPosixFilePermissions(Mockito.any(), Mockito.any()))
            .thenThrow(new IOException("io exception"));
    fstore.filesHelper = helper;
    try {
        File file = new File(FSTORE_PATH, "domain");
        Set<PosixFilePermission> perms = EnumSet.of(PosixFilePermission.OWNER_READ,
                PosixFilePermission.OWNER_WRITE, PosixFilePermission.OWNER_EXECUTE);
        fstore.setupFilePermissions(file, perms);
        fail();
    } catch (Exception ex) {
        assertTrue(true);
    }
}