private void jsonRPCCall(final URL specFile) throws IOException {
    final String json = Resources.toString(specFile, StandardCharsets.UTF_8);
    final ObjectNode specNode = (ObjectNode) objectMapper.readTree(json);
    final String rawRequestBody = specNode.get("request").toString();

    final RequestBody requestBody = RequestBody.create(rawRequestBody, JSON);
    final Request request = new Request.Builder().post(requestBody).url(baseUrl).build();

    try (final Response resp = client.newCall(request).execute()) {
      final int expectedStatusCode = specNode.get("statusCode").asInt();
      assertThat(resp.code()).isEqualTo(expectedStatusCode);

      final JsonNode expectedResponse = specNode.get("response");
      if (expectedResponse.isObject()) {
        try {
          final ObjectNode responseBody =
              (ObjectNode) objectMapper.readTree(Objects.requireNonNull(resp.body()).string());
          checkResponse(
              responseBody,
              (ObjectNode) expectedResponse,
              getMethod(rawRequestBody),
              getTraceType(specFile.toString()));
        } catch (final Exception e) {
          throw new RuntimeException("Unable to parse response as json object", e);
        }
      } else if (expectedResponse.isArray()) {
        final ArrayNode responseBody;
        try {
          responseBody =
              (ArrayNode) objectMapper.readTree(Objects.requireNonNull(resp.body()).string());
        } catch (final Exception e) {
          throw new RuntimeException("Unable to parse response as json Array", e);
        }
        for (int i = 0; i < ((ArrayNode) expectedResponse).size(); i++) {
          checkResponse(
              (ObjectNode) responseBody.get(i),
              (ObjectNode) ((ArrayNode) expectedResponse).get(i),
              getMethod(rawRequestBody),
              getTraceType(specFile.toString()));
        }
      }
    }
  }
Searches the provided subdirectories for spec files containing test cases, and returns
parameters required to run these tests.

@param subDirectoryPaths The subdirectories to search.
@return Parameters for this test which will contain the name of the test and the url of the
    spec file to run.
ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/AbstractJsonRpcHttpBySpecTest.java