private void checkResponse(
      final ObjectNode responseBody,
      final ObjectNode expectedResponse,
      final Method method,
      final TraceType traceType)
      throws JsonProcessingException {
    // Check id
    final String actualId = responseBody.get("id").toString();
    final String expectedId = expectedResponse.get("id").toString();
    assertThat(actualId).isEqualTo(expectedId);

    // Check version
    final String actualVersion = responseBody.get("jsonrpc").toString();
    final String expectedVersion = expectedResponse.get("jsonrpc").toString();
    assertThat(actualVersion).isEqualTo(expectedVersion);

    // Check result
    if (expectedResponse.has("result")) {
      assertThat(responseBody.has("result")).isTrue();

      String expectedResult = expectedResponse.get("result").toString();
      String actualResult = responseBody.get("result").toString();

      if (method.equals(Method.TRACE_CALL_MANY)) {
        // TODO: There are differences in gas cost (causing different balances as well). These are
        // caused by
        // OpenEthereum not implementing "Istanbul" correctly. Specially the SSTORE to dirty storage
        // Slots should cost 800 gas rather than 5000
        // This should be fixed, e.g. by using
        // Erigon to
        // create the expected output, or by making OpenEthereum work correctly.
        switch (traceType) {
          case TRACE:
            expectedResult = filterStringTrace(expectedResult);
            actualResult = filterStringTrace(actualResult);
            break;
          case VM_TRACE:
            expectedResult = filterStringVmTrace(expectedResult);
            actualResult = filterStringVmTrace(actualResult);
            break;
          case STATE_DIFF:
            expectedResult = filterStringStateDiff(expectedResult);
            actualResult = filterStringStateDiff(actualResult);
            break;
          default:
            throw new RuntimeException(
                "Unrecognized trace type (expected trace | vmTrace | stateDiff)");
        }
      }

      final ObjectMapper mapper = new ObjectMapper();
      mapper.configure(INDENT_OUTPUT, true);
      assertThat(
              mapper
                  .writerWithDefaultPrettyPrinter()
                  .withoutAttribute("creationMethod")
                  .writeValueAsString(mapper.readTree(actualResult)))
          .isEqualTo(
              mapper
                  .writerWithDefaultPrettyPrinter()
                  .withoutAttribute("creationMethod")
                  .writeValueAsString(mapper.readTree(expectedResult)));
    }

    // Check error
    if (expectedResponse.has("error")) {
      assertThat(responseBody.has("error")).isTrue();
      final String expectedError = expectedResponse.get("error").toString();
      final String actualError = responseBody.get("error").toString();
      assertThat(actualError).isEqualToIgnoringWhitespace(expectedError);
    }
  }
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