test: fix ClientTest not catching exception
@@ -13,6 +13,7 @@ import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertThrows;
class ClientTest {
@@ -91,6 +92,7 @@ class ClientTest {
@Test
@DisplayName("setNetwork() functions correctly")
void testReplaceNodes() {
+ assertDoesNotThrow(() -> {
@Var Map<AccountId, String> nodes = new HashMap<>();
nodes.put(new AccountId(3), "0.testnet.hedera.com:50211");
nodes.put(new AccountId(4), "1.testnet.hedera.com:50211");
@@ -106,5 +108,6 @@ class ClientTest {
Assertions.assertEquals(client.getNetworkChannel(new AccountId(5)).authority(), "2.testnet.hedera.com:50211");
Assertions.assertThrows(IllegalArgumentException.class , () -> client.getNetworkChannel(new AccountId(3)));
+ });
}
}
