public function assertQueriesCountByFilter($n, $filter, $message = '')
    {
        $this->readQueries();
        $message = $message ?: 'Failed asserting that ' . $n . ' queries were triggered by filter [' . $filter . ']';
        $iterator = new FiltersQueriesFilter(new \ArrayIterator($this->filteredQueries), $filter);
        Assert::assertCount($n, iterator_to_array($iterator), $message);
    }