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