public static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials) {
        byte[] encodedTransaction;
        if (rawTransaction.getTransaction().getType().isEip4844()) {
            encodedTransaction = encode4844(rawTransaction);
        } else {
            encodedTransaction = encode(rawTransaction);
        }
        Sign.SignatureData signatureData =
                Sign.signMessage(encodedTransaction, credentials.getEcKeyPair());

        return encode(rawTransaction, signatureData);
    }
@Test
    public void testEip155TransactionWithLargeChainId() {
        assertArrayEquals(
                TransactionEncoder.signMessage(
                        createEip155RawTransaction(),
                        Long.MAX_VALUE,
                        SampleKeys.CREDENTIALS_ETH_EXAMPLE),
                (Numeric.hexStringToByteArray(
                        "0xf875098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008089010000000000000021a0ed14bd16ddd7788623f4439db3ddbc8bf548c241c3af87819c187a638ef40e17a03b4972ee3adb77b6b06784d12fe098c2cb84c03afd79d17b1caf8f63483101f0")));
    }