### Question:
PeerTable { public EvictResult tryEvict(final PeerId peer) { final Bytes id = peer.getId(); final int distance = distanceFrom(peer); if (distance == 0) { return EvictResult.self(); } distanceCache.remove(id); if (table[distance].getPeers().isEmpty()) { return EvictResult.absent(); } final boolean evicted = table[distance].evict(peer); if (evicted) { evictionCnt++; } else { return EvictResult.absent(); } if (evictionCnt >= BLOOM_FILTER_REGENERATION_THRESHOLD) { ForkJoinPool.commonPool().execute(this::buildBloomFilter); } return EvictResult.evicted(); } PeerTable(final Bytes nodeId, final int bucketSize);  PeerTable(final Bytes nodeId); Optional<DiscoveryPeer> get(final PeerId peer); AddResult tryAdd(final DiscoveryPeer peer); EvictResult tryEvict(final PeerId peer); List<DiscoveryPeer> nearestPeers(final Bytes target, final int limit); Stream<DiscoveryPeer> streamAllPeers();  }### Answer:
@Test public void evictPeerFromEmptyTableShouldNotEvict() { final PeerTable table = new PeerTable(Peer.randomId(), 16); final DiscoveryPeer peer = helper.createDiscoveryPeer(); final EvictResult evictResult = table.tryEvict(peer); assertThat(evictResult.getOutcome()).isEqualTo(EvictOutcome.ABSENT); }
@Test public void evictAbsentPeerShouldNotEvict() { final PeerTable table = new PeerTable(Peer.randomId(), 16); final DiscoveryPeer peer = helper.createDiscoveryPeer(); final List<DiscoveryPeer> otherPeers = helper.createDiscoveryPeers(5); otherPeers.forEach(table::tryAdd); final EvictResult evictResult = table.tryEvict(peer); assertThat(evictResult.getOutcome()).isEqualTo(EvictOutcome.ABSENT); }
@Test public void evictSelfPeerShouldReturnSelfOutcome() { final DiscoveryPeer peer = helper.createDiscoveryPeer(); final PeerTable table = new PeerTable(peer.getId(), 16); final EvictResult evictResult = table.tryEvict(peer); assertThat(evictResult.getOutcome()).isEqualTo(EvictOutcome.SELF); }