@Override
  public boolean sendElectionMessage(int currentId, String content) {
    var candidateList = findElectionCandidateInstanceList(currentId);
    if (candidateList.isEmpty()) {
      return true;
    } else {
      var electionMessage = new Message(MessageType.ELECTION_INVOKE, "");
      candidateList.forEach((i) -> instanceMap.get(i).onMessage(electionMessage));
      return false;
    }
  }
@Test
  void testElectionMessageAccepted() {
    var instance1 = new BullyInstance(null, 1, 1);
    var instance2 = new BullyInstance(null, 1, 2);
    var instance3 = new BullyInstance(null, 1, 3);
    var instance4 = new BullyInstance(null, 1, 4);
    Map<Integer, Instance> instanceMap = Map.of(1, instance1, 2, instance2, 3, instance3, 4, instance4);
    instance1.setAlive(false);
    var messageManager = new BullyMessageManager(instanceMap);
    var result = messageManager.sendElectionMessage(2, "2");
    assertTrue(result);
  }