class TxPoolBesuPendingTransactions implements JsonRpcMethod {

  @Override
  public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {

    final Integer limit = requestContext.getRequiredParameter(0, Integer.class);
    final List<Filter> filters =
        requestContext
            .getOptionalParameter(1, PendingTransactionsParams.class)
            .map(PendingTransactionsParams::filters)
            .orElse(Collections.emptyList());

    final Set<Transaction> pendingTransactionsFiltered =
        pendingTransactionFilter.reduce(pendingTransactions.getTransactionInfo(), filters, limit);

    return new JsonRpcSuccessResponse(
        requestContext.getRequest().getId(),
        pendingTransactionsFiltered.stream()
            .map(TransactionPendingResult::new)
            .collect(Collectors.toSet()));
  }

  public  TxPoolBesuPendingTransactions(final PendingTransactions pendingTransactions);

}