public static RawTransaction decode(final String hexTransaction) {
        final byte[] transaction = Numeric.hexStringToByteArray(hexTransaction);
        TransactionType transactionType = getTransactionType(transaction);

        switch (transactionType) {
            case EIP1559:
                return decodeEIP1559Transaction(transaction);
            case EIP4844:
                return decodeEIP4844Transaction(transaction);
            case EIP2930:
                return decodeEIP2930Transaction(transaction);
            default:
                return decodeLegacyTransaction(transaction);
        }
    }
@Test
    public void testDecodingSigned4844() throws SignatureException {
        final RawTransaction rawTransaction = createEip4844RawTransaction();
        final Transaction4844 transaction4844 = (Transaction4844) rawTransaction.getTransaction();

        final byte[] signedMessage =
                TransactionEncoder.signMessage(rawTransaction, SampleKeys.CREDENTIALS);
        final String signedHexMessage = Numeric.toHexString(signedMessage);

        final SignedRawTransaction result =
                (SignedRawTransaction) TransactionDecoder.decode(signedHexMessage);
        assertTrue(result.getTransaction() instanceof Transaction4844);
        final Transaction4844 resultTransaction4844 = (Transaction4844) result.getTransaction();

        assertNotNull(result);
        assertTrue(
                range(0, transaction4844.getBlobs().get().size())
                        .allMatch(
                                i ->
                                        transaction4844
                                                .getBlobs()
                                                .get()
                                                .get(i)
                                                .getData()
                                                .equals(
                                                        resultTransaction4844
                                                                .getBlobs()
                                                                .get()
                                                                .get(i)
                                                                .getData())));
        assertEquals(transaction4844.getChainId(), resultTransaction4844.getChainId());
        assertEquals(transaction4844.getNonce(), resultTransaction4844.getNonce());
        assertEquals(transaction4844.getMaxFeePerGas(), resultTransaction4844.getMaxFeePerGas());
        assertEquals(
                transaction4844.getMaxPriorityFeePerGas(),
                resultTransaction4844.getMaxPriorityFeePerGas());
        assertEquals(transaction4844.getGasLimit(), resultTransaction4844.getGasLimit());
        assertEquals(transaction4844.getTo(), resultTransaction4844.getTo());
        assertEquals(transaction4844.getValue(), resultTransaction4844.getValue());
        assertEquals(transaction4844.getData(), resultTransaction4844.getData());
        assertEquals(
                transaction4844.getMaxFeePerBlobGas(), resultTransaction4844.getMaxFeePerBlobGas());
        assertEquals(result.getFrom(), SampleKeys.CREDENTIALS.getAddress());
    }