@Test
  public void emptyBatchRequest() throws Exception {
    final RequestBody body = RequestBody.create("[]", JSON);

    try (final Response resp = client.newCall(buildPostRequest(body)).execute()) {
      assertThat(resp.code()).isEqualTo(400);
      final JsonObject json = new JsonObject(resp.body().string());
      final RpcErrorType expectedError = RpcErrorType.INVALID_REQUEST;
      testHelper.assertValidJsonRpcError(
          json, null, expectedError.getCode(), expectedError.getMessage());
    }
  }
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