private boolean filterExists(final String filterId) {
    final JsonRpcResponse response = method.response(requestWithParams(String.valueOf(filterId)));
    if (response instanceof JsonRpcSuccessResponse) {
      return true;
    } else {
      assertThat(response).isInstanceOf(JsonRpcErrorResponse.class);
      assertThat(((JsonRpcErrorResponse) response).getErrorType())
          .isEqualTo(RpcErrorType.FILTER_NOT_FOUND);
      return false;
    }
  }
Determines whether a specified filter exists.

@param filterId The filter ID to check.
@return A boolean - true if the filter exists, false if not.
ethereum/api/src/integration-test/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/fork/frontier/EthGetFilterChangesIntegrationTest.java