### Question:
PeerDiscoveryAgent { public Stream<DiscoveryPeer> streamDiscoveredPeers() { return controller.map(PeerDiscoveryController::streamDiscoveredPeers).orElse(Stream.empty()); } protected  PeerDiscoveryAgent(
      final NodeKey nodeKey,
      final DiscoveryConfiguration config,
      final PeerPermissions peerPermissions,
      final NatService natService,
      final MetricsSystem metricsSystem); abstract CompletableFuture<?> stop(); CompletableFuture<Integer> start(final int tcpPort); void addPeerRequirement(final PeerRequirement peerRequirement); Stream<DiscoveryPeer> streamDiscoveredPeers(); void dropPeer(final PeerId peer); Optional<DiscoveryPeer> getAdvertisedPeer(); Bytes getId(); long observePeerBondedEvents(final PeerBondedObserver observer); boolean removePeerBondedObserver(final long observerId); @VisibleForTesting int getObserverCount(); boolean isActive(); void bond(final Peer peer);  }### Answer:
@Test public void neighborsPacketFromUnbondedPeerIsDropped() { final MockPeerDiscoveryAgent agent = helper.startDiscoveryAgent(Collections.emptyList()); assertThat(agent.streamDiscoveredPeers()).isEmpty(); final MockPeerDiscoveryAgent otherNode = helper.startDiscoveryAgent(); final List<DiscoveryPeer> peers = helper.createDiscoveryPeers(5); final NeighborsPacketData data = NeighborsPacketData.create(peers); final Packet packet = Packet.create(PacketType.NEIGHBORS, data, otherNode.getNodeKey()); helper.sendMessageBetweenAgents(otherNode, agent, packet); assertThat(agent.streamDiscoveredPeers()).isEmpty(); }