diff --git a/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeCreateTransactionTest.java b/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeCreateTransactionTest.java index 239cf2d1b..af814fb1f 100644 --- a/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeCreateTransactionTest.java +++ b/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeCreateTransactionTest.java @@ -61,7 +61,7 @@ public class NodeCreateTransactionTest { private static final byte[] TEST_GRPC_CERTIFICATE_HASH = new byte[]{5, 6, 7, 8, 9}; private static final PublicKey TEST_ADMIN_KEY = PrivateKey.fromString( - "302e020100300506032b65700422042062c4b69e9f45a554e5424fb5a6fe5e6ac1f19ead31dc7718c2d980fd1f998d4b") + "302e020100300506032b65700422042062c4b69e9f45a554e5424fb5a6fe5e6ac1f19ead31dc7718c2d980fd1f998d4b") .getPublicKey(); final Instant TEST_VALID_START = Instant.ofEpochSecond(1554158542); @@ -83,7 +83,7 @@ void shouldSerialize() { private static Endpoint spawnTestEndpoint(byte offset) { return new Endpoint() - .setAddress(new byte[] {0x00, 0x01, 0x02, 0x03}) + .setAddress(new byte[]{0x00, 0x01, 0x02, 0x03}) .setDomainName(offset + "unit.test.com") .setPort(42 + offset); } @@ -126,13 +126,12 @@ void fromScheduledTransaction() { void testUnrecognizedServicePort() throws Exception { var tx = new NodeCreateTransaction() .setServiceEndpoints( - List.of(new Endpoint() - .setAddress(new byte[] {0x00, 0x01, 0x02, 0x03}) - .setDomainName("unit.test.com") - .setPort(50111))); - var tx2Bytes = tx.toBytes(); - NodeCreateTransaction deserializedTx = (NodeCreateTransaction) Transaction.fromBytes(tx2Bytes); - assertThat(tx.getServiceEndpoints()).isEqualTo(deserializedTx.getServiceEndpoints()); + List.of(new Endpoint() + .setAddress(new byte[]{0x00, 0x01, 0x02, 0x03}) + .setDomainName("unit.test.com") + .setPort(50111))); + var tx2 = NodeCreateTransaction.fromBytes(tx.toBytes()); + assertThat(tx2.toString()).isEqualTo(tx.toString()); } @Test @@ -143,7 +142,7 @@ void testNullOptionalValues() throws Exception { } @Test - void testSetNull() { + void testSetNull() { new NodeCreateTransaction() .setDescription(null) .setAccountId(null) diff --git a/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeUpdateTransactionTest.java b/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeUpdateTransactionTest.java index 1796cc456..e79f6e156 100644 --- a/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeUpdateTransactionTest.java +++ b/sdk/src/test/java/com/hedera/hashgraph/sdk/NodeUpdateTransactionTest.java @@ -87,7 +87,7 @@ void shouldSerialize() { private static Endpoint spawnTestEndpoint(byte offset) { return new Endpoint() - .setAddress(new byte[] {0x00, 0x01, 0x02, 0x03}) + .setAddress(new byte[]{0x00, 0x01, 0x02, 0x03}) .setDomainName(offset + "unit.test.com") .setPort(42 + offset); } @@ -129,7 +129,7 @@ void testUnrecognizedServicePort() throws Exception { var tx = new NodeUpdateTransaction() .setServiceEndpoints( List.of(new Endpoint() - .setAddress(new byte[] {0x00, 0x01, 0x02, 0x03}) + .setAddress(new byte[]{0x00, 0x01, 0x02, 0x03}) .setDomainName("unit.test.com") .setPort(50111))); var tx2 = NodeUpdateTransaction.fromBytes(tx.toBytes()); @@ -148,7 +148,7 @@ void testEmptyCertificates() throws Exception { } @Test - void testSetNull() { + void testSetNull() { new NodeUpdateTransaction() .setDescription(null) .setAccountId(null)