@Test void getListeningAddresses_shouldReturnAddressFromNetwork() { final NetworkDataProvider network = new NetworkDataProvider(p2pNetwork); final String nodeAddress = "/some/libp2p/addr"; when(p2pNetwork.getNodeAddress()).thenReturn(nodeAddress); assertThat(network.getListeningAddresses()).isEqualTo(List.of(nodeAddress)); }
public List<String> getListeningAddresses() { return List.of(network.getNodeAddress()); }
NetworkDataProvider { public List<String> getListeningAddresses() { return List.of(network.getNodeAddress()); } }
NetworkDataProvider { public List<String> getListeningAddresses() { return List.of(network.getNodeAddress()); } NetworkDataProvider(final Eth2Network network); }
NetworkDataProvider { public List<String> getListeningAddresses() { return List.of(network.getNodeAddress()); } NetworkDataProvider(final Eth2Network network); Optional<String> getEnr(); String getNodeIdAsBase58(); List<String> getPeersAsBase58(); long getPeerCount(); int getListenPort(); List<String> getListeningAddresses(); List<String> getDiscoveryAddresses(); Metadata getMetadata(); List<tech.pegasys.teku.api.response.v1.node.Peer> getPeers(); Optional<tech.pegasys.teku.api.response.v1.node.Peer> getPeerById(final String peerId); }
NetworkDataProvider { public List<String> getListeningAddresses() { return List.of(network.getNodeAddress()); } NetworkDataProvider(final Eth2Network network); Optional<String> getEnr(); String getNodeIdAsBase58(); List<String> getPeersAsBase58(); long getPeerCount(); int getListenPort(); List<String> getListeningAddresses(); List<String> getDiscoveryAddresses(); Metadata getMetadata(); List<tech.pegasys.teku.api.response.v1.node.Peer> getPeers(); Optional<tech.pegasys.teku.api.response.v1.node.Peer> getPeerById(final String peerId);  }