public Optional<String> getErrorMsg() {
        if (hasLeader()) {
            return Optional.empty();
        }
        return Optional.of("No leader for raft group " + Constants.NAMING_PERSISTENT_SERVICE_GROUP
                + ", please see logs `alipay-jraft.log` or `naming-raft.log` to see details.");
    }
@Test
    void testGetErrorMsg() {
        ServerStatusManager serverStatusManager = new ServerStatusManager(protocolManager, switchDomain);
        Optional<String> errorMsg = serverStatusManager.getErrorMsg();
        assertTrue(errorMsg.isPresent());
    }