@Test void removePeer() { EphemeralPeerRepository repo = new EphemeralPeerRepository(); State state = new State(repo, Hash::keccak256, new MockMessageSender(), messageRef::set, (message, peer) -> true); Peer peer = new PeerImpl(); state.addPeer(peer); state.removePeer(peer); assertTrue(repo.peers().isEmpty()); assertTrue(repo.lazyPushPeers().isEmpty()); assertTrue(repo.eagerPushPeers().isEmpty()); }
public void removePeer(Peer peer) { peerRepository.removePeer(peer); }
State { public void removePeer(Peer peer) { peerRepository.removePeer(peer); } }
State { public void removePeer(Peer peer) { peerRepository.removePeer(peer); } State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      Consumer<Bytes> messageListener,
      MessageValidator messageValidator);  State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      Consumer<Bytes> messageListener,
      MessageValidator messageValidator,
      long graftDelay,
      long lazyQueueInterval); }
State { public void removePeer(Peer peer) { peerRepository.removePeer(peer); } State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      Consumer<Bytes> messageListener,
      MessageValidator messageValidator);  State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      Consumer<Bytes> messageListener,
      MessageValidator messageValidator,
      long graftDelay,
      long lazyQueueInterval); void addPeer(Peer peer); void removePeer(Peer peer); void receiveGossipMessage(Peer peer, Bytes message); void receiveIHaveMessage(Peer peer, Bytes messageHash); void receivePruneMessage(Peer peer); void receiveGraftMessage(Peer peer, Bytes messageHash); void sendGossipMessage(Bytes message); void stop(); }
State { public void removePeer(Peer peer) { peerRepository.removePeer(peer); } State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      Consumer<Bytes> messageListener,
      MessageValidator messageValidator);  State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      Consumer<Bytes> messageListener,
      MessageValidator messageValidator,
      long graftDelay,
      long lazyQueueInterval); void addPeer(Peer peer); void removePeer(Peer peer); void receiveGossipMessage(Peer peer, Bytes message); void receiveIHaveMessage(Peer peer, Bytes messageHash); void receivePruneMessage(Peer peer); void receiveGraftMessage(Peer peer, Bytes messageHash); void sendGossipMessage(Bytes message); void stop();  }