/**
  * @param string $name
  * @param string $type
  * @param int $preConfigId
  * @param array $params
  * @param array $preconfigure
  * @param string $widgetXml
  * @param \Magento\Widget\Block\BlockInterface|null $widgetBlock
  * @return void
  * @dataProvider generateWidgetDataProvider
  */
 protected function generalForGenerateWidget($name, $type, $preConfigId, $params, $preconfigure, $widgetXml, $widgetBlock)
 {
     $this->widgetResourceMock->expects($this->any())->method('loadPreconfiguredWidget')->with($preConfigId)->willReturn($preconfigure);
     $this->widgetMock->expects($this->any())->method('getWidgetByClassType')->with($type)->willReturn($widgetXml);
     $this->layoutMock->expects($this->any())->method('createBlock')->with($type, $name, ['data' => $params])->willReturn($widgetBlock);
 }