test: add a regression test
import com.google.errorprone.annotations.Var;
-import com.hedera.hashgraph.sdk.*;
+import com.hedera.hashgraph.sdk.ReceiptStatusException;
+import com.hedera.hashgraph.sdk.Status;
+import com.hedera.hashgraph.sdk.TopicCreateTransaction;
+import com.hedera.hashgraph.sdk.TopicDeleteTransaction;
+import com.hedera.hashgraph.sdk.TopicInfoQuery;
+import com.hedera.hashgraph.sdk.TopicMessageSubmitTransaction;
+import com.hedera.hashgraph.sdk.Transaction;
+import org.bouncycastle.util.encoders.Hex;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
@@ -179,4 +186,18 @@ public class TopicMessageSubmitIntegrationTest {
testEnv.close();
});
}
+
+ @Test
+ @DisplayName("Hex Decode Regression Test")
+ void decodeHexRegressionTest() {
+ assertDoesNotThrow(() -> {
+ String binaryHex = "2ac2010a580a130a0b08d38f8f880610a09be91512041899e11c120218041880c2d72f22020878da01330a0418a5a1201210303030303030313632373633373731351a190a130a0b08d38f8f880610a09be91512041899e11c1001180112660a640a20603edaec5d1c974c92cb5bee7b011310c3b84b13dc048424cd6ef146d6a0d4a41a40b6a08f310ee29923e5868aac074468b2bde05da95a806e2f4a4f452177f129ca0abae7831e595b5beaa1c947e2cb71201642bab33fece5184b04547afc40850a";
+ byte[] transactionBytes = Hex.decode(binaryHex);
+
+ Transaction transaction = Transaction.fromBytes(transactionBytes);
+
+ String idString = transaction.getTransactionId().toString();
+ String transactionString = transaction.toString();
+ });
+ }
}
