@Test
  public void handleResponseWithOptionalEmptyValue() throws Exception {
    final JsonRpcMethod method = TestJsonRpcMethodsUtil.optionalEmptyResponse();
    rpcMethods.put(method.getName(), method);

    final String jsonString =
        "{ \"id\": 1, \"jsonrpc\": \"2.0\", \"method\": \"" + method.getName() + "\" }";
    final RequestBody body = RequestBody.create(jsonString, JSON);

    try (final Response resp = client.newCall(buildPostRequest(body)).execute()) {
      final JsonObject json = new JsonObject(resp.body().string());
      assertThat(json.getString("result")).isNull();
    } finally {
      rpcMethods.remove(method.getName());
    }
  }
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