diff --git a/core/src/test/java/bisq/core/btc/nodes/FederatedBtcNodeProviderTest.java b/core/src/test/java/bisq/core/btc/nodes/FederatedBtcNodeProviderTest.java new file mode 100644 index 0000000000..cb9ed7d1b5 --- /dev/null +++ b/core/src/test/java/bisq/core/btc/nodes/FederatedBtcNodeProviderTest.java @@ -0,0 +1,32 @@ +package bisq.core.btc.nodes; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertIterableEquals; + +public class FederatedBtcNodeProviderTest { + @Test + void onlyHardcodedNodes() { + var hardcodedNodes = List.of( + new BtcNodes.BtcNode(null, "alice.onion", null, + BtcNodes.BtcNode.DEFAULT_PORT, "@alice"), + new BtcNodes.BtcNode(null, "bob.onion", null, + BtcNodes.BtcNode.DEFAULT_PORT, "@bob"), + new BtcNodes.BtcNode(null, "charlie.onion", null, + BtcNodes.BtcNode.DEFAULT_PORT, "@charlie") + ); + + List mutableHardcodedList = new ArrayList<>(hardcodedNodes); + List filterProvidedBtcNodes = Collections.emptyList(); + List bannedBtcNodes = Collections.emptyList(); + + List selectedNodes = FederatedBtcNodeProvider + .getNodes(mutableHardcodedList, filterProvidedBtcNodes, bannedBtcNodes); + + assertIterableEquals(hardcodedNodes, selectedNodes); + } +}