private void assertTransactionResultMatchesTransaction(
      final JsonObject result,
      final Transaction transaction,
      final Integer index,
      final Hash blockHash,
      final Optional<Wei> baseFee,
      final Long blockNumber) {
    assertThat(Hash.fromHexString(result.getString("hash"))).isEqualTo(transaction.getHash());
    assertThat(Long.decode(result.getString("nonce"))).isEqualByComparingTo(transaction.getNonce());
    if (blockHash != null) {
      assertThat(Hash.fromHexString(result.getString("blockHash"))).isEqualTo(blockHash);
    } else {
      assertThat(result.getValue("blockHash")).isNull();
    }
    if (blockNumber != null) {
      assertThat(Long.decode(result.getString("blockNumber"))).isEqualTo(blockNumber);
    } else {
      assertThat(result.getValue("blockNumber")).isNull();
    }
    if (index != null) {
      assertThat(UInt256.fromHexString(result.getString("transactionIndex")).intValue())
          .isEqualTo(index);
    } else {
      assertThat(result.getValue("transactionIndex")).isNull();
    }
    assertThat(Address.fromHexString(result.getString("from"))).isEqualTo(transaction.getSender());
    if (transaction.getTo().isPresent()) {
      assertThat(Address.fromHexString(result.getString("to")))
          .isEqualTo(transaction.getTo().get());
    } else {
      assertThat(result.getValue("to")).isNull();
    }
    assertThat(Wei.fromHexString(result.getString("value"))).isEqualTo(transaction.getValue());
    assertThat(Optional.ofNullable(result.getString("gasPrice")).map(Wei::fromHexString))
        .isEqualTo(Optional.of(transaction.getEffectiveGasPrice(baseFee)));
    assertThat(Optional.ofNullable(result.getString("maxFeePerGas")).map(Wei::fromHexString))
        .isEqualTo(transaction.getMaxFeePerGas());
    assertThat(
            Optional.ofNullable(result.getString("maxPriorityFeePerGas")).map(Wei::fromHexString))
        .isEqualTo(transaction.getMaxPriorityFeePerGas());
    assertThat(Long.decode(result.getString("gas"))).isEqualTo(transaction.getGasLimit());
    assertThat(Bytes.fromHexString(result.getString("input"))).isEqualTo(transaction.getPayload());
  }
Tests that empty batch requests are treated as invalid requests as per
http://www.jsonrpc.org/specification#batch.
ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcHttpServiceTest.java