@Test public void shouldAddEnoughPeersToReachUpperBoundWhenPeerCountIsBelowRange() { assertThat(new TargetPeerRange(5, 10, 0).getPeersToAdd(4)).isEqualTo(6); }
public int getPeersToAdd(final int currentPeerCount) { return currentPeerCount < addPeersWhenLessThan ? dropPeersWhenGreaterThan - currentPeerCount : 0; }
TargetPeerRange { public int getPeersToAdd(final int currentPeerCount) { return currentPeerCount < addPeersWhenLessThan ? dropPeersWhenGreaterThan - currentPeerCount : 0; } }
TargetPeerRange { public int getPeersToAdd(final int currentPeerCount) { return currentPeerCount < addPeersWhenLessThan ? dropPeersWhenGreaterThan - currentPeerCount : 0; } TargetPeerRange(
      final int addPeersWhenLessThan,
      final int dropPeersWhenGreaterThan,
      final int minimumRandomlySelectedPeerCount); }
TargetPeerRange { public int getPeersToAdd(final int currentPeerCount) { return currentPeerCount < addPeersWhenLessThan ? dropPeersWhenGreaterThan - currentPeerCount : 0; } TargetPeerRange(
      final int addPeersWhenLessThan,
      final int dropPeersWhenGreaterThan,
      final int minimumRandomlySelectedPeerCount); int getPeersToAdd(final int currentPeerCount); int getPeersToDrop(final int currentPeerCount); int getRandomlySelectedPeersToAdd(final int currentRandomlySelectedPeerCount); int getRandomlySelectedPeersToDrop(
      final int currentRandomlySelectedPeerCount, final int currentTotalPeerCount); }
TargetPeerRange { public int getPeersToAdd(final int currentPeerCount) { return currentPeerCount < addPeersWhenLessThan ? dropPeersWhenGreaterThan - currentPeerCount : 0; } TargetPeerRange(
      final int addPeersWhenLessThan,
      final int dropPeersWhenGreaterThan,
      final int minimumRandomlySelectedPeerCount); int getPeersToAdd(final int currentPeerCount); int getPeersToDrop(final int currentPeerCount); int getRandomlySelectedPeersToAdd(final int currentRandomlySelectedPeerCount); int getRandomlySelectedPeersToDrop(
      final int currentRandomlySelectedPeerCount, final int currentTotalPeerCount);  }