### Question:
SeedPeers implements PeerDiscovery { @Nullable public InetSocketAddress getPeer() throws PeerDiscoveryException { try { return nextPeer(); } catch (UnknownHostException e) { throw new PeerDiscoveryException(e); } } SeedPeers(NetworkParameters params);  SeedPeers(int[] seedAddrs, NetworkParameters params); @Nullable InetSocketAddress getPeer(); @Override InetSocketAddress[] getPeers(long services, long timeoutValue, TimeUnit timeoutUnit); @Override void shutdown();  }### Answer:
@Test public void getPeer_one() throws Exception{ SeedPeers seedPeers = new SeedPeers(MAINNET); assertThat(seedPeers.getPeer(), notNullValue()); }
@Test public void getPeer_all() throws Exception{ SeedPeers seedPeers = new SeedPeers(MAINNET); for (int i = 0; i < MAINNET.getAddrSeeds().length; ++i) { assertThat("Failed on index: "+i, seedPeers.getPeer(), notNullValue()); } assertThat(seedPeers.getPeer(), equalTo(null)); }
@Test public void getPeer_one() throws Exception { SeedPeers seedPeers = new SeedPeers(MAINNET); assertThat(seedPeers.getPeer(), notNullValue()); }
@Test public void getPeer_all() throws Exception { SeedPeers seedPeers = new SeedPeers(MAINNET); for (int i = 0; i < MAINNET.getAddrSeeds().length; ++i) { assertThat("Failed on index: " + i, seedPeers.getPeer(), notNullValue()); } assertThat(seedPeers.getPeer(), equalTo(null)); }
@Test public void getPeer_one() throws Exception{ SeedPeers seedPeers = new SeedPeers(MainNetParams.get()); assertThat(seedPeers.getPeer(), notNullValue()); }
@Test public void getPeer_all() throws Exception{ SeedPeers seedPeers = new SeedPeers(MainNetParams.get()); for (int i = 0; i < MainNetParams.get().getAddrSeeds().length; ++i) { assertThat("Failed on index: "+i, seedPeers.getPeer(), notNullValue()); } assertThat(seedPeers.getPeer(), equalTo(null)); }