In Flutter widget testing, I cant seem to find a widget even though I can find its children and parent

I am trying to conduct a widget test and I have a widget like this and the objects in the item = [] are 4:

    Widget _generateNodesWidget() {
    return ListView(
      children: [
            padding: const EdgeInsets.all(10.0),
            child: ExpansionPanelList(
              expansionCallback: (int index, bool isExpanded) {
                setState(() {
                  _items[index].isExpanded = !_items[index].isExpanded;
                  //TODO: Implement the call to blocks widget here
                  _items[index].body = _items[index].node.blocks.isEmpty ? _buildBlankBlockTile() : BlockWidget(nodeElement: _items[index],);
              children: item) {
                return ExpansionPanel(
                  headerBuilder: (BuildContext context, bool isExpanded) {
                    return Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: NodeWidget(node: item.node),
                  isExpanded: item.isExpanded,
                  body: item.body,

running this tests below also work:

 testWidgets('Verify the completion of the first call ',
      (WidgetTester tester) async {
    await tester.pumpWidget(
        create: (_) => NodesProvider(),
        child: const MediaQuery(
          data: MediaQueryData(),
          child: MaterialApp(
            home: ToysScreen(),

    await tester.pumpAndSettle();

    expect(find.byType(NodeWidget), findsNWidgets(4)); // this finds the NodeWidget
    expect(find.byType(ExpansionPanelList), findsNWidgets(1)); // this finds the ExpansionPanelList
expect(find.byType(ListView), findsNWidgets(1)); // this finds the ListView

but the code below never works even tho ExpansionPanel is the parent of the NodeWidget and the Child of the ExpansionListTile:

expect(find.byType(ExpansionPanel), findsNWidgets(4)); // it fails cause it 0 even tho there are 4 ExpansionPanel displayed on Screen;

What could the issue be?