public List<Node> getFollowers() {
        final List<Node> ret = new ArrayList<>();
        this.lock.lock();
        try {
            for (final NodeImpl node : this.nodes) {
                if (!node.isLeader() && !this.learners.contains(node.getServerId())) {
                    ret.add(node);
                }
            }
        } finally {
            this.lock.unlock();
        }
        return ret;
    }
Test cluster for NodeTest
@author boyan (boyan@alibaba-inc.com)

2018-Apr-20 1:41:17 PM
jraft-extension/rpc-grpc-impl/src/test/java/com/alipay/sofa/jraft/core/TestCluster.java